DB/ORACLE

테이블 컬럼 정보 select문

질주하는구 2015. 3. 9. 14:15

/* 테이블 정보 가져오기 */


select table_name, initial_extent, next_extent, pct_free, pct_used

from user_tables

where table_name like 'TZ%';


 


/* 컬럼 정보 가져오기 */

select column_nm.*

from user_tables, (

    select table_name, column_name, data_type, nullable, data_length, column_id

    from All_tab_columns

    where owner = '***'

    ) column_nm

where user_tables.table_name = column_nm.table_name

and user_tables.table_name like 'TZ%'

반응형