sql insert 触发器(插入时判断)

2025-04-07 01:24:43
推荐回答(2个)
回答1:

create trigger 触发器名 on table ICPurchaseEntry
for insert
as
update ICPurchaseEntry
set 辅助金额 =金额1 where ID in (select ID from inserted) and 辅助金额 is not null
go

回答2:

update ICPurchaseEntry set 金额1 = 辅助金额
where id in (select id from inserted) and 辅助金额 is not null