CREATE TRIGGER TR_BORROW ON BORROW
AFTER INSERT
AS
IF((SELECT I.BNO FROM INSERTED I) in(SELECT BNO FROM BOOKS WHERE BNAME=‘b002‘))
BEGIN
INSERT BORROW_SAVE
SELECT * FROM INSERTED I
PRINT ‘已经备份该记录‘
END
ELSE
BEGIN
PRINT ‘未备份该记录‘
END
时间: 2024-10-05 05:07:13