1. 테이블 컬럼 정보 조회
SELECT
TABLE_NAME,
COLUMN_NAME,
DATA_TYPE,
COLUMN_ID,
REPLACE(COLUMN_ID, 'N', '') as NULLABLE,
DATA_DEFAULT,
(
SELECT
comments
FROM
all_col_comments
where
table_name = a.TABLE_NAME
and column_name = a.COLUMN_NAME
) as comments
FROM
all_tab_columns a
WHERE
table_name in (
'TABLE1','TABLE2','TABLE3','TABLE4'
)
ORDER BY
TABLE_NAME,
COLUMN_ID
2. 테이블별 용량
select
table_name,
round(num_rows * avg_row_len / 1024 / 1024,2) mb
from all_tables
WHERE table_name
IN ('TABLE1', 'TABLE2', 'TABLE3', 'TABLE4');