执行该语句
INSERT INTO shs_user (id,name,age,addres,CREATE_TIME)
VALUES (5,'shs',24,'sichuan',20230315 10:10:15);
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 ‘10:10:15)’
将数据进行包裹,同时注意日期的格式规范要求
INSERT INTO shs_user (id,name,age,addres,CREATE_TIME)
VALUES (5,'shs',24,'sichuan','2023-03-15 10:10:15');
在编写sql语句的时候注意加分号
;
文章指出了一条SQL插入语句中的错误,包括日期格式不正确和缺少分号。解决方案是使用正确的日期格式,例如2023-03-1510:10:15,并确保语句结尾有分号。
16万+

被折叠的 条评论
为什么被折叠?



