关闭

Export the table decribe from oracle data dictionary

321人阅读 评论(0) 收藏 举报

select b.TABLE_NAME as tablename,
       --c.comments as "表说明",  
       --b.COLUMN_ID as "字段序号",  
       b.COLUMN_NAME as Name,
       b.DATA_TYPE || '(' || decode(b.DATA_TYPE,
                                    'NUMBER',
                                    b.DATA_PRECISION || ',' || b.DATA_SCALE,
                                    b.DATA_LENGTH) || ')' as type,
       b.NULLABLE,
       b.DATA_DEFAULT ,
       a.comments
  from all_col_comments a, all_tab_columns b, all_tab_comments c
 where a.owner = b.owner
   and a.table_name = b.TABLE_NAME
   and a.column_name = b.COLUMN_NAME
   and c.table_name = a.table_name
   and c.owner = a.owner
   and a.TABLE_NAME in ('T_ACTION','T_ANSWER')
 order by a.table_name, b.column_id;

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:69548次
    • 积分:1330
    • 等级:
    • 排名:千里之外
    • 原创:65篇
    • 转载:22篇
    • 译文:0篇
    • 评论:24条
    文章分类
    最新评论
    同学朋友