check the manual that corresponds to your MySQL server version for the right syntax to use near (0)

问题
在使用Navicat从mysql数据库导出sql后,在其他数据库中执行该sql语句时,报了以下错误

> 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 '(0) NULL DEFAULT NULL COMMENT '创建时间',
  update_by varchar(64) CHARACT' at line 14

解决方法
该问题的出现是因为使用Navicat转储sql文件时,遇到datetime类型时,会自动在datetime后加上(0)。
此问题解决只需将所有datetime(0)替换成datetime,然后就大功告成。

Affected rows: 1
时间: 0.001s

猜你喜欢

转载自blog.csdn.net/qq_47768542/article/details/111484053