create TRIGGER B_U
ON dbo.B
for insert UPDATE
AS
if exists(select price from inserted where price is not null)
update dbo.B
set PRICE
from inserted,dbo.A
where inserted.ID=dbo.B.ID and inserted.NAME =dbo.A.NAME
create TRIGGER B_U
ON dbo.B
for insert UPDATE
AS
update dbo.B
set PRICE
from inserted,dbo.A
where inserted.ID=dbo.B.ID and inserted.NAME =dbo.A.NAME