Monday, June 24, 2013

"Javadoc" for ORACLE DB

Documentation should be embedded in code. Everything else is way, way suboptimal.

You can easily document your DB like this:
This will display all tables
SELECT table_name FROM user_tables;
This will display all Comments on all Tables, Views, Columns:
SELECT TABLE_NAME, table_type, comments from user_tab_comments order by table_name;

To make it only for TABLEs:
SELECT TABLE_NAME, table_type, comments from user_tab_comments where table_name = 'TABLE' order by table_name;


No comments: