34,594
社区成员
发帖
与我相关
我的任务
分享
alter table tb add column int(4) not null if exists 'tb';
if OBJECT_ID('表名')is not null
if object_id('tb','U') is not null
alter table tb add column int(4) not null
if object_id('tb') is not null
alter table tb add column int not null --不需要那个4
if object_id('tb','u') is not null
alter table tb add column int not null --不需要那个4
if exists(select * from sys.tables where name='t') select '存在'
if object_id('tb','u') is not null
alter table tb add column int(4) not null