日期:2014-05-18 浏览次数:20511 次
CREATE TRIGGER TRI_NAME_DEL ON tblStudent FOR DELETE AS DECLARE @towcount int SET @towcount= COUNT(*) from DELETED if @towcount>2 ROLLBACK TRANSACTION print 'you cannot delete more than one student at a time!' END
CREATE TRIGGER TRI_NAME_DEL ON tblStudent FOR DELETE as begin DECLARE @towcount int select @towcount= COUNT(*) from DELETED if @towcount>2 begin ROLLBACK TRANSACTION print 'you cannot delete more than one student at a time!' end END