try:alter trigger insert_test
on dbo.aa
instead of insert
as
begin
insert into aa
select * from inserted a
where not exists(select * from aa where objida.objid)
end
on dbo.aa
instead of insert
as
begin
insert into aa
select * from inserted a
where not exists(select * from aa where objida.objid)
end
on dbo.aa
instead of insert
as
begin
insert into aa
select * from inserted a
where not exists(select * from aa where objid=a.objid))
end
on dbo.aa
instead of insert
as
begin
insert into aa
select * from inserted a
where not exists(select * from aa where objid=a.objid)
end
select * from 源表 a
where not exists (select * from 目标表 where 主键=a.主键)
--不明白你为什么还要触发器
1、如果你只是一个字段,没必要用checksum
2、触发器会带慢系统的速度,频繁操作的表,最好不要用触发器