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

你可能感兴趣的:(SQL Server)