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

posted @ 2020-07-28 11:21  泉城余文乐  Views(68)  Comments(0Edit  收藏  举报