alter table MyTable  add  datedate CONSTRAINT AddDateDflt
DEFAULT getdate()

解决方案 »

  1.   

    右键菜单中选设计表
    在默认值中写上getdate()就可以了
      

  2.   

    ALTER TABLE MyTable 
    ADD AddDate smalldatetime NULL
    CONSTRAINT AddDateDflt
    DEFAULT getdate() WITH VALUES
      

  3.   

    create table a(a char(10) null, b date not null  default getdate())
    insert into a(a)values('test')
      

  4.   

    ALTER TABLE a 
    ADD CONSTRAINT AddDateDflt
    DEFAULT getdate() WITH VALUES FOR datedate