【发布时间】:2020-06-26 14:50:20
【问题描述】:
所以我想将 msyql 查询转换为 sqlite,其中包含十六进制代码中的图像,当我在 sqlite 浏览器中运行相同的查询时,它给了我一个错误,正确的做法是什么。
Result: hex literal too big: 0x73616666726f6e2e6a7067
At line 1:
INSERT INTO `test` (`id`, `yeild`, `image`, `city`, `info`, `fertilizer`) VALUES
(9, 'Wheat', 0x77686561742e6a7067, 'Bangalore', 'Weather that is comfortable for humans is also good for wheat. Wheat needs 12\r\nto 15 inches (31 to 38 centimetres) of water to produce a')
CREATE TABLE IF NOT EXISTS `test` (
`id` int(11) NOT NULL PRIMARY KEY,
`yeild` varchar(40) NOT NULL,
`image` blob NOT NULL,
`city` varchar(50) NOT NULL,
`info` varchar(60000) NOT NULL,
`fertilizer` varchar(5000) NOT NULL);
【问题讨论】:
-
你能分享一下表格的DDL吗?
image字段的数据类型是什么 -
我使用过blob数据类型