--测试 create table a1( a int, b int ) go create table a2( a int, b int ) goCREATE TRIGGER testinsert ON a1 FOR INSERT AS BEGIN insert into a2 select * from inserted end GO select * from a1 select * from a2 go insert into a1 select 1,1 from sysobjects go select * from a1 select * from a2
create table a1(
a int,
b int
)
go
create table a2(
a int,
b int
) goCREATE TRIGGER testinsert
ON a1
FOR INSERT
AS
BEGIN
insert into a2 select * from inserted
end
GO
select * from a1
select * from a2
go
insert into a1 select 1,1 from sysobjects
go
select * from a1
select * from a2