使用触发器 set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go CREATE TRIGGER [InsertRollBack] ON [dbo].[table1] AFTER INSERT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for trigger here rollback tran END
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
CREATE TRIGGER [InsertRollBack]
ON [dbo].[table1]
AFTER INSERT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
rollback tran
END