篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql MS SQL而不是触发器相关的知识,希望对你有一定的参考价值。
-- INSTEAD OF TRIGGER
-- There can only be One INSTEAD OF trigger
-- per table
CREATE TRIGGER ContactTypeDenyInsertTrigger
ON [Person].[ContactType]
Instead Of Insert
AS
PRINT 'I in`t gonna insert that.'
GO
-- Execution
INSERT [Person].[ContactType] (Name,ModifiedDate)
VALUES ('Assassin',GETDATE());
-- Output
-- I in`t gonna insert that.
-- (1 row(s) affected)