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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 09:33:011138Durchsuche

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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn