Answers for "comments in oracle"

SQL
2

oracle comment on view

COMMENT ON TABLE view_name IS 'A view comment';
COMMENT ON COLUMN view_name.MY_COLUMN IS 'A column comment';

SELECT * FROM ALL_TAB_COMMENTS WHERE TABLE_NAME = 'VIEW_NAME';
SELECT * FROM ALL_COL_COMMENTS WHERE TABLE_NAME = 'VIEW_NAME';
Posted by: Guest on June-15-2021
0

oracle table comment

SELECT * FROM ALL_TAB_COMMENTS WHERE TABLE_NAME = 'MY_TABLE';  -- Table comment
SELECT * FROM ALL_COL_COMMENTS WHERE TABLE_NAME = 'MY_TABLE';  -- Columns comments

-- All owner tables:
SELECT t.OWNER, t.TABLE_NAME, com.COMMENTS
FROM DBA_TABLES t
LEFT JOIN DBA_TAB_COMMENTS com ON com.OWNER = t.OWNER AND com.TABLE_NAME = t.TABLE_NAME
WHERE t.OWNER = 'TRANSFERT_DOAAT' AND t.DROPPED = 'NO'
ORDER BY t.OWNER, t.TABLE_NAME;
Posted by: Guest on June-15-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language