Oracle获取表字段名,字段类型,字段长度,注释

SELECT b.comments as 注释,
       a.column_name as 列名,
       a.data_type || '(' || a.data_length || ')' as 数据类型,
       a.nullable as 是否为空
  FROM user_tab_columns a, user_col_comments b
 WHERE a.TABLE_NAME = '表名'
   and b.table_name = '表名'
   and a.column_name = b.column_name

 

posted @ 2019-01-30 16:02  经典鸡翅  阅读(9573)  评论(0编辑  收藏  举报