INSERT INTO t_search_vehicle(NAME,DESCRIBE,TYPE,create_time)VALUES ('motorcycle_1','摩托车','1',NOW());
DESCRIBE 是 mysql 的关键字,执行出错了.
错误代码: 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 'describe,type,create_time) values ('motorcycle_1','摩托车','1',now())' at line 1
最后经过把describe改成反引号(数字键1旁边ESC下面的那个键)就好了.
INSERT INTO t_search_vehicle(NAME,`describe`,TYPE,create_time) VALUES ('motorcycle_1','摩托车','1',NOW())
以上执行成功.
在使用MSSQL Server时,关键字用中括号[]也是可以解决的.