详细内容
判断sql server是否存在某个字段的方法
发布日期:2012-05-18     点击:3091     字体:[ ]

这里表名:hrshhbd;字段名:hbdntaccount

不存在则新增:

if not  exists   (select   *   from   syscolumns   where   id=object_id('hrshhbd')  
and   name= 'hbdntaccount') 
begin
alter table hrshhbd
add hbdntaccount char(80) default ''

end

用户评论
昵称 
内容  *
验证码   
   
Copyright © 2010 zdbase.com All Rights Reserved. 苏ICP备15039389号 可人软件设计