mysql-创建含有日期的表的时候报错,以至于无法创建成功
程序员文章站
2022-06-11 15:26:40
...
mysql
我创建表test,有两个字段id,ctime;
CREATE TABLE test(
id INT PRIMARY KEY,
ctime DATETIME NOT NULL DEFAULT CURDATE()
);
错误码: 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 'curdate()
)' at line 3