oracle查询表字段和注释

select 
      ut.COLUMN_NAME,--字段名称
      uc.comments,--字段注释
      ut.DATA_TYPE,--字典类型
      ut.DATA_LENGTH,--字典长度
      ut.NULLABLE--是否为空
from user_tab_columns  ut
inner JOIN user_col_comments uc
on ut.TABLE_NAME  = uc.table_name and ut.COLUMN_NAME = uc.column_name
where ut.Table_Name='B_EVAL_GRADE' 
order by ut.column_name

Table_Name= 的表名需要大写。
posted @ 2020-04-26 11:00  迷途的小码农  阅读(4252)  评论(0编辑  收藏  举报