close

--Table comment
select *
from sys.user_tab_comments
where table_type ='TABLE'
--Column comment
select *
from sys.user_col_comments
where Table_name =upper('Table_Name')

 

---------------------------------------------

 select itbA.OWNER,itbA.TABLE_NAME,itbb.COMMENTS,itbc.COLUMN_NAME,itbc.DATA_TYPE,itbc.DATA_LENGTH,itbd.COMMENTS col_comment
 from ALL_TABLES itbA left join SYS.USER_TAB_COMMENTS itbb on itbA.TABLE_NAME=itbb.TABLE_NAME
 left join user_tab_columns itbc on itbb.TABLE_NAME=itbc.TABLE_NAME
 left join SYS.USER_COL_COMMENTS itbd on itbc.TABLE_NAME=itbd.TABLE_NAME and itbc.COLUMN_NAME=itbd.COLUMN_NAME
 order by owner,itbA.TABLE_NAME,itbc.COLUMN_ID

 

arrow
arrow
    文章標籤
    oracle
    全站熱搜
    創作者介紹
    創作者 JosephChou 的頭像
    JosephChou

    Joseph A-Sa-BLue

    JosephChou 發表在 痞客邦 留言(0) 人氣()