mysql date怎么设置默认值
1个回答
展开全部
在sqlserver2000中可以这样
create table test(name varchar(10),registerTime datetime default getdate());
设置默认值。但在MySQ中
create table test(name varchar(10),registerTime datetime default now());
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near 'now()
)' at line 2
如何在MySQL中设置datetime型的当前默认值
create table test(name varchar(10),registerTime datetime default getdate());
设置默认值。但在MySQ中
create table test(name varchar(10),registerTime datetime default now());
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near 'now()
)' at line 2
如何在MySQL中设置datetime型的当前默认值
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询