CREATE TRIGGER 名 ON table_a
FOR INSERT
AS
update table_b set b2_colum=0 from inserted A where A.a1_column='00000000' and A.a1_column=table_b.b2_column
FOR INSERT
AS
update table_b set b2_colum=0 from inserted A where A.a1_column='00000000' and A.a1_column=table_b.b2_column
FOR INSERT
AS
update table_b set b2_colum=0 from inserted A where
-----------------------------------^^^^^^^^存放当前插入的系统临时表
A.a1_column='00000000' and A.a1_column=table_b.b2_column
在insered中存放着插入的数据
create table 大力(a int,b int)
go
CREATE TRIGGER 名 ON 大力
FOR INSERT
AS
select * from inserted
go
insert 大力 values(1,2)
---------上面这句的同时,触发器将inserted中的内容显示给你看了!!!
go