欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql-创建含有日期的表的时候报错,以至于无法创建成功

程序员文章站 2022-06-17 13:43:04
...
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

相关标签: mysql