insert 表 (列1,时间) values ('a',getDate())

解决方案 »

  1.   

    select getDate() 现在时间
      

  2.   

    把默认值设置为getDate()后,且不为空后insert 表(除了时间列) ......--------------------添加默认在mmc的设计中,或下列代码:
    alter  table  表名  add  constraint  约束名  default  getDate  for  列名
      

  3.   

    把字段值默认为以下方式即可。
    CreateDate  datetime not null DEFAULT CURRENT_TIMESTAMP
      

  4.   

    将字段设置为timestamp类型,在更新和插入时候是用不着管的alter table table_1
       alter column_1 timestamp
      

  5.   

    赞同sky_blue(老衲),默认值的方法可以免维护。