目前不能使用now()做为默认值.

解决方案 »

  1.   

    如果要使用在insert 或者update时将某字段值为当前时间,可以将该字段类型设为timestamp即可
      

  2.   

    create table lt_news
    (id int unsigned not null auto_increment,
     title varchar(100) not null,
     content text,
     dt datetime default now())
    是可以运行的,不过要改一下
    create table lt_news
    (id int unsigned not null auto_increment,
     title varchar(100) not null,
     content text,
     dt datetime default "now()"),不过在mysql中还不支持,不起作用。