oracle add column comment

Solutions on MaxInterview for oracle add column comment by the best coders in the world

showing results for - "oracle add column comment"
Iain
31 Jun 2018
1COMMENT ON COLUMN TABLE_NAME.MY_COLUMN IS 'A column comment';
2SELECT * FROM ALL_COL_COMMENTS WHERE TABLE_NAME = 'TABLE_NAME';
3-- All schema columns:
4SELECT t.OWNER, t.TABLE_NAME, c.COLUMN_NAME, com.COMMENTS
5FROM DBA_TABLES t LEFT JOIN DBA_TAB_COLUMNS c
6    ON c.OWNER = t.OWNER AND c.TABLE_NAME = t.TABLE_NAME
7LEFT JOIN DBA_COL_COMMENTS com ON com.OWNER = c.OWNER AND com.TABLE_NAME = c.TABLE_NAME
8    AND com.COLUMN_NAME = c.COLUMN_NAME
9WHERE t.OWNER = 'MY_OWNER' AND t.DROPPED = 'NO'
10ORDER BY t.OWNER, t.TABLE_NAME, c.COLUMN_NAME;