• 产看Oracle表结构


    select a.TABLE_NAME,
           c.COMMENTS,
           a.COLUMN_ID,
           a.COLUMN_NAME,
           b.COMMENTS,
           a.DATA_TYPE,
           a.DATA_LENGTH,
           a.DATA_PRECISION,
           a.data_scale,
           case
             when d.POSITION = 1 then
              '是'
             else
              ' '
           end 主键
      from (select a.TABLE_NAME,
                   a.COLUMN_ID,
                   a.COLUMN_NAME,
                   a.DATA_TYPE,
                   a.DATA_LENGTH,
                   a.DATA_PRECISION,
                   a.data_scale
              from user_tab_columns a
             where a.TABLE_NAME in
                   (select a.TABLE_NAME
                      from user_tables a
                     where a.TABLE_NAME in
                           ('DCS_RESERVED_DATA_UNDERLYING_INFO',
                            'DCS_RESERVED_DATA_OBJECT_INT_RATE_INFO',
                            'DCS_RESERVED_DATA_FLOAT_INT_RATE_INFO',
                            'DCS_RESERVED_DATA_ASSET_PCKG_OVERVIEW',
                            'DCS_RESERVED_DATA_PYMNT_DATE_CAL',
                            'DCS_RESERVED_DATA_INT_PYMNT_CASHFLOW',
                            'DCS_RESERVED_DATA_PRINCIPAL_REPAYMENT_CASHFLOW',
                            'DCS_RESERVED_DATA_EXCESS_INCOME_CASHFLOW',
                            'DCS_RESERVED_DATA_OPTION_INFO',
                            'DCS_RESERVED_DATA_ASSET_RTNG',
                            'DCS_RESERVED_DATA_ASSET_INSTU',
                            'DCS_RESERVED_DATA_ASSET_INSTU_ENTY_RTNG',
                            'DCS_RESERVED_DATA_CASHFLOW_CLLTN',
                            'DCS_RESERVED_DATA_ASSET_PCKG_INFO',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_INDSTRY',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_AREA',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_DTL',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_PRNCPL_RPYMNT',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_FINCER',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_FINCER_INSTU',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_FINCER_SHRHLDR',
                            'DCS_RESERVED_DATA_BOTTOM_ASSET_FINCER_RTNG'))
             order by a.TABLE_NAME, a.COLUMN_ID) a
      left join user_col_comments b
        on a.TABLE_NAME = b.TABLE_NAME
       and a.COLUMN_NAME = b.COLUMN_NAME
      left join user_tab_comments c
        on a.TABLE_NAME = c.TABLE_NAME
      left join user_cons_columns d
        on a.TABLE_NAME = d.TABLE_NAME
       and a.COLUMN_NAME = d.COLUMN_NAME
    

      

  • 相关阅读:
    深度学习之神经网络的结构
    分圆问题:一个诡异的数列规律
    形象展示傅里叶变换
    最速降线问题
    ip address add 200.1.1.2/24 dev eth1
    Learn X in Y minutes Where X=c++
    sigsuspend
    tcp 代理的作用
    UNIX网络编程卷2进程间通信读书笔记(二)—管道 (1)
    UNIX网络编程卷2进程间通信读书笔记(一)—概述
  • 原文地址:https://www.cnblogs.com/zhanglin123/p/14453213.html
Copyright © 2020-2023  润新知