自己顶一下,大家帮帮我啊.还没有搞定哩.
我在调试时写了一条这样的语句.
if not exists (select * from sysobjects a,syscolumns b where a.id=b.id and a.name='student' and b.name='score' )
begin
alter table student add score int(4)
update student set score=123
end
但是调试不能,只能这样
if not exists (select * from sysobjects a,syscolumns b where a.id=b.id and a.name='student' and b.name='score' )
alter table student add score int(4)
update student set score=123
但是这不是我想要的,这样的话,如果原来有这个字段,会把这个字段都替换过去的.
|