1COMMENT ON TABLE table_name IS 'A table comment';
2COMMENT ON COLUMN table_name.MY_COLUMN IS 'A column comment';
3
4SELECT * FROM ALL_TAB_COMMENTS WHERE TABLE_NAME = 'TABLE_NAME';
5SELECT * FROM ALL_COL_COMMENTS WHERE TABLE_NAME = 'TABLE_NAME';
1SELECT * FROM ALL_TAB_COMMENTS WHERE TABLE_NAME = 'MY_TABLE'; -- Table comment
2SELECT * FROM ALL_COL_COMMENTS WHERE TABLE_NAME = 'MY_TABLE'; -- Columns comments
3
4-- All owner tables:
5SELECT t.OWNER, t.TABLE_NAME, com.COMMENTS
6FROM DBA_TABLES t
7LEFT JOIN DBA_TAB_COMMENTS com ON com.OWNER = t.OWNER AND com.TABLE_NAME = t.TABLE_NAME
8WHERE t.OWNER = 'TRANSFERT_DOAAT' AND t.DROPPED = 'NO'
9ORDER BY t.OWNER, t.TABLE_NAME;