Dev/Database

[Oracle] 데이터 타입체크하기

여뭐준 2021. 11. 4. 14:56
SELECT a.TABLE_NAME, c.COMMENTS, a.COLUMN_NAME, b.COMMENTS, a.DATA_TYPE, a.DATA_LENGTH, a.NULLABLE 
FROM USER_TAB_COLUMNS a, USER_COL_COMMENTS b, USER_TAB_COMMENTS c, USER_TABLES d 
where 1=1 
and a.TABLE_NAME = D.TABLE_NAME 
and a.TABLE_NAME=b.TABLE_NAME 
and b.TABLE_NAME=c.TABLE_NAME 
and a.COLUMN_NAME=b.COLUMN_NAME 
and a.TABLE_NAME =upper(:TABLENAME)
order by a.TABLE_NAME, a.COLUMN_ID;
반응형