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

 

上一篇:git branch


下一篇:java基础语法01 注释