SQL是否存在表或列

来源:互联网 发布:在职研软件工程硕士 编辑:程序博客网 时间:2024/05/18 03:17

是否存在表

if not exists (SELECT   name   FROM   sysobjects   where   name= 'T_SCS_Student_OtherChargeItemExtend')

begin

end

是否存在列名

if not exists( select * from syscolumns where id=object_id('T_SCS_OtherChargeItem') and name='ChargeStanderd')


begin


end";

原创粉丝点击