Get Columns and Comments (Oracle)


/ Published in: SQL
Save to your folder(s)

Get all my columns and comments.


Copy this code and paste it in your HTML
  1. SELECT col.table_name
  2. ,col.column_name
  3. ,col.data_type
  4. ,col.data_default
  5. ,col.nullable
  6. ,CASE WHEN col.data_type = 'varchar2' THEN col.data_length ELSE NULL END AS data_length
  7. ,com.comments
  8. FROM user_col_comments com
  9. JOIN user_tab_cols col
  10. ON com.table_name=col.table_name
  11. AND com.column_name=col.column_name
  12. ORDER BY col.table_name, col.column_id

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.