ORACLE 查询所有表和字段信息

select a.owner,
          a.table_name,
          c.comments tab_comments,
          a.column_name,
          a.data_type,
          b.comments col_comments
from all_tab_columns a, all_col_comments b, all_tab_comments c
where a.table_name = b.table_name
   and a.owner = b.owner
   and a.column_name = b.column_name
   and a.table_name = c.table_name
   and a.owner = c.owner
   and c.table_type = 'TABLE'
   and a.table_name in ('T_KH')
order by a.table_name;

猜你喜欢

转载自www.cnblogs.com/wangrui1587165/p/9274987.html