ORACLE - PK, FK 조회
SELECT AA.COLUMN_ID, AA.COLUMN_NAME, BB.COMMENTS, AA.DATA_TYPE, AA.DATA_DEFAULT, CC.PK, AA.NULLABLE, CC.FK FROM ALL_TAB_COLUMNS AA, ALL_COL_COMMENTS BB, (SELECT A.OWNER, A.TABLE_NAME, A.CONSTRAINT_TYPE, COLUMN_NAME, POSITION, CASE WHEN A.CONSTRAINT_TYPE = 'P' THEN 'Y' END AS PK, CASE WHEN A.CONSTRAINT_TYPE = 'R' THEN 'Y' END AS FK FROM ALL_CONSTRAINTS A, ALL_CONS_COLUMNS B WHERE UPPER (A.OWNER) ..