主鍵約束SELECT USER_CONS_COLUMNS.CONSTRAINT_NAME AS 約束名, USER_CONS_COLUMNS.TABLE_NAME AS 表名, USER_CONS_COLUMNS.COLUMN_NAME AS 列名, USER_CONS_COLUMNS.POSITION AS 位置FROM USER_CONSTRAINTS JOIN USER_CONS_COLUMNS ON (USER_CONSTRAINTS.CONSTRAINT_NAME = USER_CONS_COLUMNS.CONSTRAINT_NAME)WHERE CONSTRAINT_TYPE = 'P';外鍵約束SELECT USER_CONS_COLUMNS.CONSTRAINT_NAME AS 約束名, USER_CONS_COLUMNS.TABLE_NAME AS 子表名, USER_CONS_COLUMNS.COLUMN_NAME AS 子表列名, USER_CONS_COLUMNS.POSITION AS 位置, USER_INDEXES.TABLE_NAME AS 主表名, USER_IND_COLUMNS.COLUMN_NAME AS 主表列名FROM USER_CONSTRAINTS JOIN USER_CONS_COLUMNS ON (USER_CONSTRAINTS.CONSTRAINT_NAME = USER_CONS_COLUMNS.CONSTRAINT_NAME) JOIN USER_INDEXES ON (USER_CONSTRAINTS.R_CONSTRAINT_NAME = USER_INDEXES.INDEX_NAME) JOIN USER_IND_COLUMNS ON (USER_INDEXES.INDEX_NAME = USER_IND_COLUMNS.INDEX_NAME)WHERE CONSTRAINT_TYPE = 'R';其餘約束SELECT USER_CONS_COLUMNS.CONSTRAINT_NAME AS 約束名, USER_CONS_COLUMNS.TABLE_NAME AS 表名, USER_CONS_COLUMNS.COLUMN_NAME AS 列名, USER_CONS_COLUMNS.POSITION AS 位置, CONSTRAINT_TYPE, SEARCH_CONDITIONFROM USER_CONSTRAINTS JOIN USER_CONS_COLUMNS ON (USER_CONSTRAINTS.CONSTRAINT_NAME = USER_CONS_COLUMNS.CONSTRAINT_NAME)WHERE CONSTRAINT_TYPE IN ('C', 'V', 'O');