增加一列,并且在增加前进行判断这一列是否存在
IF NOT EXISTS
(SELECT 1 FROM information_schema.columns WHERE table_name='SRBIMLDBZCY' AND COLUMN_NAME='LDBZCY_GROUPNAME')
alter table SRBIMLDBZCY add
LDBZCY_GROUPNAME varchar(255) null
go
IF NOT EXISTS
(SELECT 1 FROM information_schema.columns WHERE table_name='SRBIMLDBZCY' AND COLUMN_NAME='LDBZCY_GROUPNAME')
alter table SRBIMLDBZCY add
LDBZCY_GROUPNAME varchar(255) null
go