테이블별 제약조건 검색

select a.constraint_name
      , decode(a.constraint_type, 'R', a.r_owner||'.'||b.table_name ) as pk_table
      , a.owner||'.'||a.table_name as fk_table
  from dba_constraints a
     , dba_constraints b
 where a.constraint_type='R'
   and a.r_owner=b.owner(+)
   and a.r_constraint_name = b.constraint_name(+)
   and a.r_owner not in ('SYS')
;
출처 : http://blog.daum.net/_blog/BlogTypeView.do?blogid=0C8Is&articleno=18351262#ajax_history_home

You may also like...

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다