日期:2014-05-16  浏览次数:20537 次

判断某字段默认值是否为指定字符时报错
if '未审'<>(select b.text as moren from syscolumns a left join syscomments b on a.cdefault=b.id   
where a.id=object_id('DkSx') and a.name='YwSpLx') 
alter table DkSx add default('未审') for YwSpLx


判断某字段默认值是否为指定字符时报错:
')' 附近有语法错误。

------解决方案--------------------
alter table 表
drop constraint default约束的名称