merge
是否可以使用Oracle中的函数修改多个表?在每种情况下,都需要采取不同的操作,例如:
MERGE INTO users tab1
USING(SELECT 1 id, 10 points FROM dual) tab2
ON(tab1.id = tab2.id )
WHEN MATCHED THEN
UPDATE SET points = tab2.points
UPDATE "abc" = action.status -- another table
WHEN NOT MATCHED THEN
INSERT(id, points) VALUES(tab2.id, tab2.points)
UPDATE "def" = action.status -- another table