IF Not Exists(select * from syscolumns where [name]='字段名'
and OBJECTPROPERTY(id,'IsUserTable')=1 and object_name(id)='表名')
begin
Alter Table [表名] add 字段名 nvarchar(50)
end
转载于:https://www.cnblogs.com/lzj1981/archive/2013/04/29/3050671.html
IF Not Exists(select * from syscolumns where [name]='字段名'
and OBJECTPROPERTY(id,'IsUserTable')=1 and object_name(id)='表名')
begin
Alter Table [表名] add 字段名 nvarchar(50)
end
转载于:https://www.cnblogs.com/lzj1981/archive/2013/04/29/3050671.html