关于sql数据库中触发器
程序代码:
if exits(select * from sys.objects where name='trg_stu_delete') drop trigger trg_stu_delete go create trigger trg_stu_delete on student after deleted as if delete(studentid) begin delete borrowrecord from borrowrecord,deleted where studentid=delete.studentid end
最近学习了触发器,遇到个问题想要请教
求助: 如果我把if delete(studentid)给去掉,只留sql语句,那表达的意思应该还是:在删除studenid时触发该触发器器吧,那是不是if delete(studentid)可以去掉?