if exists(select * from syscolumns where id=object_id('TA') and name='ZDA')
alter table TA drop column ZDA;alter table TA add ZDA int not null default 0;
alter table TA drop column ZDA;alter table TA add ZDA int not null default 0;
解决方案 »
- 存储过程参数前加N
- 头都想破了,高手帮忙啊
- 数据库中已存在名为 'sp_AddUser' 的对象。对象 'sp_AddUser' 在数据库 'Perinfo' 中不存在。
- 求出每行中的最小字段值,一点疑问
- SQL server 2008 错误7303
- 数据库设计问题
- 数据库里是Numeric型,应该用什么类型来输入参数?(简单问题,立刻给分!)
- 怎样实现拼音首字查询
- 能否将搜索结果替换原表格
- C++中如何写基于OTL存储过程的sql语句
- 请教:sqlserver的一张表创建两个触发器报错?
- vista(Home Basic)系统下SQL2005JDBC直连为什么不能用呀?请高手帮我解决呀,急呀!
alter table TA drop column ZDA;alter table TA add ZDA int not null default 0;
alter table TA drop column ZDAalter table TA add ZDA int not null default 0 with values -- 多了with values而且,直接赋值
alter table TA drop column ZDA;alter table TA add ZDA int not null default 0;
if exists(select * from syscolumns where id = object_id('TA') and name='ZDA')
beginalter table TA add ZDA int not null default 0
end