Oracle exists

agnusdei·2023년 7월 5일
0
post-custom-banner
<delete id="deleteContents" parameterType="VO">
    /* QUERY.deleteContents */
    DELETE FROM TABLE_NAME A
     WHERE EXISTS (SELECT B.*
                     FROM (SELECT SYS_SN, TBL_NM FROM T_LINK_DB_INFO WHERE SYS_SN = #{systSerno}
                           MINUS
                           SELECT #{systSerno} SYS_SN, CLASS_NAME TBL_NM FROM DB_CLASS WHERE UPPER(OWNER_NAME) = UPPER(#{systUserId})
                          ) B
                    WHERE A.SYS_SN = B.SYS_SN
                      AND A.TBL_NM = B.TBL_NM)
</delete>
  1. EXISTS 조회되는 행이 단 한 줄이라도 존재할 경우 TRUE / FALSE
post-custom-banner

0개의 댓글