zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

MySQL运行SQL文件时(全面,改成time):check the manual that corresponds to your MySQL server version for the righ

mysqlserver文件SQL for 运行 to The
2023-06-13 09:11:25 时间

大家好,又见面了,我是你们的朋友全栈君。

参考: Mysql错误:check the manual that corresponds to your MySQL server version for the right syntax【加 `符号、修改有冲突的字段名】 check the manual that corresponds to your MySQL server version for the right syntax错误【字段名用了关键字】 check the manual that corresponds to your MySQL server version for the right syntax to use near【where前多加了逗号】 Mysql异常check the manual that corresponds to your MySQL server version for the right syntax总结【sql是否有中文字符 、是否与关键字冲突、是否含特殊字符、是否正确分行】

这些文章里的答案都没有解决我的问题!!!

后面我使用“MySQL的工作台workspace8.0”,运行SQL文件,要是遇到的错误,会有红色下划线提示,发现:(SQL文件的时间有问题)

不是insert语句有问题,也不是create创建有问题,而是时间类型有问题,无论是datetime还是time,Navicat premium工具转储数据表的结构,时间后面都会带“(0)”!!!

改:

把datetime(0)全替换成datetime或time(0)【如图所示,在xx.sql中,手动修改】:

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/139978.html原文链接:https://javaforall.cn