Oracle 批量获得数据库中表字段,类型说明,列注释等

来源:互联网 发布:淘宝不能提交订单了 编辑:程序博客网 时间:2024/06/05 18:40
select distinct t1.TABLE_NAME,--表名                t1.COLUMN_NAME,--列名                t1.DATA_TYPE,--列类型                t1.DATA_LENGTH,--列长度                t1.NULLABLE,--是否可以为空                t1.COLUMN_ID,--列创建的时候顺序                t2.COMMENTS,--表的注释                t3.COMMENTS --列的注释  from user_tab_columns t1, user_tab_comments t2, user_col_comments t3 where t1.TABLE_NAME = t2.TABLE_NAME   and t1.COLUMN_NAME = t3.COLUMN_NAME   and t1.TABLE_NAME = t3.TABLE_NAME   --查询表名以xx开头的所有表   and t1.TABLE_NAME like 'OMS%' order by t1.TABLE_NAME, t1.COLUMN_ID

 

阅读全文
0 0