|
发表于 2010-1-15 21:00:52
|
显示全部楼层
If COLUMNPROPERTY(OBJECT_ID('fa_assettypes'),'sDefaultCleanUpSubjectNum','PRECISION') IS NULL
BEGIN
ALTER TABLE fa_assettypes add sDefaultCleanUpSubjectNum nvarchar (60)
ALTER TABLE fa_assettypes add bNewAssetDepr bit NOT NULL default 0
END
拆分成:
If COLUMNPROPERTY(OBJECT_ID('fa_assettypes'),'sDefaultCleanUpSubjectNum','PRECISION') IS NULL
BEGIN
ALTER TABLE fa_assettypes add sDefaultCleanUpSubjectNum nvarchar (60)
END
If COLUMNPROPERTY(OBJECT_ID('fa_assettypes'),'bNewAssetDepr','PRECISION') IS NULL
BEGIN
ALTER TABLE fa_assettypes add bNewAssetDepr bit NOT NULL default 0
END |
|