这个不用触发器就可以呀 update table_name set c=1 where table_name.a=table_name.b and table_name.a=1
感谢hllmh(小狼)的回复 能不能用触发器来实现?
create trigger trgInsert on table_name after insert as update table_name set c=1 where a=1 and b=1 gocreate trigger trgUpdate on table_name after update as update table_name set c=1 where a=1 and b=1 go
CREATE trigger triupdate on tb1 for insert as begin update tb1 set c=1 where a=1 and b=1 end
update table_name set c=1 where table_name.a=table_name.b and table_name.a=1
能不能用触发器来实现?
on table_name after insert
as
update table_name
set c=1
where a=1 and b=1
gocreate trigger trgUpdate
on table_name after update
as
update table_name
set c=1
where a=1 and b=1
go
as
begin
update tb1
set c=1
where a=1 and b=1
end