不小心update忘記添加條件,簡單限制下!
trigger針對DML頻繁操作時性能不佳 ,注意自己實際情況!
create trigger tr_tblTime
on tblTime
for update,delete
as
if ORIGINAL_LOGIN()in ('wind','snow')
and (select count(*) from deleted)> 10
BEGIN
RAISERROR ( 'Serious error, please contact the DBA',16,1)
ROLLBACK TRANSACTION
RETURN
END
go
查看本欄目