我正在尝试将此查询执行到我的sql数据库中
'INSERT INTO ba_shop_opening (day, from, to) VALUES (?, ?, ?)' with params ["mon", "1970-01-01 00:00:00", "1970-01-01 00:00:00"]:
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from, to) VALUES ('mon', '1970-01-01 00:00:00', '1970-01-01 00:00:00')' at line 1
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的表的DDL
CREATE TABLE `ba_shop_opening` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`from` datetime NOT NULL,
`to` datetime NOT NULL,
'day' VARCHAR(20) NOT NULL
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
Run Code Online (Sandbox Code Playgroud)
我不明白是什么问题.任何帮助将不胜感激.
| 归档时间: |
|
| 查看次数: |
34 次 |
| 最近记录: |