add一列

if not exists(select * from sys.columns where [object_id] = object_id('szydytglhyytb') and name = 'SZYDYTGLHYYTB_HYBM')
BEGIN
alter table szydytglhyytb add SZYDYTGLHYYTB_HYBM varchar(64) NULL;
END
GO
if not exists(select * from sys.columns where [object_id] = object_id('szydytglhyytb') and name = 'SZYDYTGLHYYTB_HYNM')
BEGIN
alter table szydytglhyytb add SZYDYTGLHYYTB_HYNM varchar(36) NULL;
END
GO
if not exists(select * from sys.columns where [object_id] = object_id('szydytglhyytb') and name = 'SZYDYTGLHYYTB_HYMC')
BEGIN
alter table szydytglhyytb add SZYDYTGLHYYTB_HYMC varchar(4000) NULL;
END
GO

猜你喜欢

转载自www.cnblogs.com/997icu/p/13390097.html
Add