--生成测试数据表结构
create table A(a_id int)
create table B(b_id int identity(0,1),a_id int)
create table C(c_id int identity(1,1),b_id int)
go--创建触发器
create trigger trg_A
on A
for insert
as
begin
    insert into B(a_id) select a_id from inserted
    insert into C(b_id) select @@identity
end
go--向A表插入数据,实现触发
insert into A select 2--查看触发器执行结果
select * from A
select * from B
select * from C--删除测试环境
drop trigger trg_A
drop table A,B,C