sql 添加删除字段
sql 添加删除字段
use dsoa
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='work_Yq')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [work_Yq]
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='work_Wc')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [work_Wc]
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='Work_Flag')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [Work_Flag]
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='Work_Remark')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [Work_Remark]
alter table Calendar_Detail
add work_Yq nvarchar(200),
work_Wc nvarchar(200),
Work_Flag int,
Work_Remark nvarchar(200)
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='work_Yq')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [work_Yq]
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='work_Wc')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [work_Wc]
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='Work_Flag')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [Work_Flag]
if exists (select * from syscolumns where id =object_id('Calendar_Detail') and name='Work_Remark')
ALTER TABLE [Calendar_Detail ] DROP COLUMN [Work_Remark]
alter table Calendar_Detail
add work_Yq nvarchar(200),
work_Wc nvarchar(200),
Work_Flag int,
Work_Remark nvarchar(200)