sql server添加表中字段脚本

declare @tableId int
set @tableId = object_id('Atmonthd')

 if not exists (
	select * from  syscolumns 
	where id = @tableId
	and name = 'OTShift_Hours'
)
begin	
	alter table Atmonthd
	add OTShift_Hours float
end
原文地址:https://www.cnblogs.com/peteryu007/p/1693629.html