Sample:
merge into item_lookup l
using (
select 3 product_type_id, 3 item_id
) t on l.product_type_id = t.product_type_id
when matched then update
set l.item_id = t.item_id
when not matched then insert
(product_type_id, item_id)
values
(t.product_type_id, t.item_id);
No comments:
Post a Comment