SpringFramework
-
[mapper] xml에서 PLSQL 쿼리 작성법SpringFramework 2023. 8. 22. 18:59
/* AdminMapper.admin */ { CALL DECLARE BEGIN -- MERGE MERGE INTO a USING b ON (a.CODE = b.CODE) WHEN MATCHED THEN UPDATE SET a.NAME = b.NAME WHEN NOT MATCHED THEN INSERT (SEQ, CODE, NAME) VALUES (SEQ.NEXTVAL, b.CODE, b.NAME); LOOP ... END LOOP; END }