FK Constraints
FOREIGN KEY CONSTRAINTS NOTES:
select c.OWNER, c.TABLE_NAME, c.CONSTRAINT_NAME, cc.COLUMN_NAME, r.TABLE_NAME, rc.COLUMN_NAME, cc.POSITION from dba_constraints c, dba_constraints r, dba_cons_columns cc, dba_cons_columns rc where c.CONSTRAINT_TYPE = 'R' and c.OWNER not in ('SYS','SYSTEM') and c.R_OWNER = r.OWNER and c.R_CONSTRAINT_NAME = r.CONSTRAINT_NAME and c.CONSTRAINT_NAME = cc.CONSTRAINT_NAME and c.OWNER = cc.OWNER and r.CONSTRAINT_NAME = rc.CONSTRAINT_NAME and r.OWNER = rc.OWNER and cc.POSITION = rc.POSITION order by c.OWNER, c.TABLE_NAME, c.CONSTRAINT_NAME, cc.POSITION
No comments:
Post a Comment