본문 바로가기
DataBase/oracle

Oracle standard... table column comment, table comment

by 아이티.파머 2011. 11. 3.
반응형
밑줄긋고, 빨간색으로 표시된 표식 주목, TAB T, USER_TAB_COMMENTS TC, user_TAB_COLUMNS C, USER_COL_COMMENTS CC

                                        
SELECT                                                                        
	T.TNAME AS TABLE_NAME,                                                
	TC.COMMENTS AS TABLE_COMMENTS,                                        
	C.COLUMN_NAME AS COLUMN_NAME,                                        
	C.DATA_TYPE AS DATA_TYPE,                                            
	CC.COMMENTS AS COLUMN_COMMENTS                                        
 FROM TAB T, USER_TAB_COMMENTS TC, user_TAB_COLUMNS C, USER_COL_COMMENTS CC
 WHERE T.TNAME = TC.TABLE_NAME                                                 
 AND T.TNAME = C.TABLE_NAME                                                     
 AND T.TNAME = CC.TABLE_NAME                                                    
 AND C.COLUMN_NAME = CC.COLUMN_NAME    


반응형