SQL添加列、非空、默认值

use MarcoBarcode

go

alter table [dbo].[WorkOrderRepairSheet]

ADD needRepair int

go

ALTER TABLE [dbo].[WorkOrderRepairSheet]

ADD  CONSTRAINT [DF_WorkOrderRepairSheet_needRepair]  DEFAULT ((1))  FOR [needRepair]

GO

alter table [dbo].[WorkOrderRepairSheet]

alter column [needRepair] int not null

posted @ 2013-11-09 10:42  enif  阅读(899)  评论(0编辑  收藏  举报
豫ICP备2021034901号