spl数据库触发器,有点错,高手帮我改改

来源:百度知道 编辑:UC知道 时间:2024/07/07 10:10:57
create trigger me
on sc
for update
as

if exists(select * from update where grade<70)
begin
print'不能修改少于70 的分数'
rollback
end

create trigger me
on sc
for update
as

if exists(select * from [update] where grade<70)
--不能修改少于70 的分数??

--那么这里应该用grade>70,你搞反了!
begin
print'不能修改少于70 的分数'
rollback
end

就是关键字的问题!

以后要[]记得括起来!
不过还是建议:尽量少用关键字作为表名阿,列名阿!

共同学习!

一楼的哥们太牛了!!
服!!!