Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Harjeet.

Asked: October 12, 2016 - 6:26 pm UTC

Last updated: October 13, 2016 - 2:13 am UTC

Version: Oracle

Viewed 1000+ times

You Asked

Can someone please help me with query for how can I extract the 'comment' section of all the tables ?

Used this query to get all the table names:

Select table_name, owner, tablespace_name from dba_tables;

Used below query to gather the comments:

select * from dba_tab_comments;


According to my knowledge: we have two types of comments : if i have to export table comments or column comments in this case I'm trying to export comments from tables.

I need help with writing query, where I can get Table_name, owner, tablespace_name, comments from dba_tables

Can someone please please please help me with this?

Thank you,

and Connor said...

DBA_COL_COMMENTS
DBA_TAB_COMMENTS

are the two views you want to look at.

Hope this helps.

Is this answer out of date? If it is, please let us know via a Comment