테이블과컬럼 
    
SELECT A.TABLE_NAME
           , A.COLUMN_NAME
           , A.DATA_TYPE
           , A.DATA_LENGTH
           , A.DATA_DEFAULT
           , A.NULLABLE
           , B.COMMENTS
FROM ALL_TAB_COLUMNS A
LEFT OUTER JOIN ALL_COL_COMMENTS B
ON A.TABLE_NAME = B.TABLE_NAME
AND A.COLUMN_NAME = B.COLUMN_NAME
WHERE A.OWNER = 'SWING';

인덱스보기               
              
 SELECT a.table_name, a.index_name, uniqueness, column_name
  FROM all_indexes a, all_ind_columns b
 WHERE a.table_name = b.table_name
   AND a.index_name = b.index_name
   AND a.OWNER = 'SWING'
ORDER BY a.table_name, b.column_position;

PK보기

SELECT a.table_name, a.constraint_name, b.column_name
  FROM all_constraints a, ALL_CONS_COLUMNS b
 WHERE a.constraint_name = b.constraint_name
   AND a.constraint_type = 'P'
  AND a.OWNER = 'SWING'


+ Recent posts