编写一个触发器,如果std_score表中Place不为空,则不允许删除本条记录。
求详细语句,谢谢!
------解决方案--------------------
create trigger dbo.trigger_std_score_delete
on dbo.std_score
for delete
as
if exists(select * from deleted where Place is not null)
rollback
go
create trigger dbo.trigger_std_score_delete
on dbo.std_score
for delete
as
if exists(select * from deleted where Place is not null)
rollback
go