日期:2014-05-16  浏览次数:20715 次

mysql 创建timestamp类型字段出错
create table test
(
 id int primary key,
 name varchar(20),
 createDate timestamp(14)
)

ERROR 1426 (42000): Too big precision 14 specified for column 'createDate'. Maxi
mum is 6.

------解决方案--------------------
timestamp类型,不要指定长度
------解决方案--------------------
create table test
(
id int primary key,
name varchar(20),
createDate timestamp
)