/ Published in: SQL
Get all my columns and comments.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT col.table_name ,col.column_name ,col.data_type ,col.data_default ,col.nullable ,CASE WHEN col.data_type = 'varchar2' THEN col.data_length ELSE NULL END AS data_length ,com.comments FROM user_col_comments com JOIN user_tab_cols col ON com.table_name=col.table_name AND com.column_name=col.column_name ORDER BY col.table_name, col.column_id