-- 判断是否存在该列
if exists(SELECT * FROM syscolumns WHERE id=object_id('@Table') and name='@COLUMN')
ALTER table @Table DROP COLUMN @COLUMN GO
--添加列
ALTER TABLE @Table ADD @COLUMN INT
GO
--设置值
UPDATE @Table SET @COLUMN=0
--设置属性
ALTER TABLE dbo.@Table ALTER COLUMN @COLUMN INT NOT NULL