星空网 > 软件开发 > 数据库

Oracle抓取表结构的语句

oracle ---------------------------------------
 
SELECT case when t.COLUMN_ID=1 then t.table_name end table_name,
       case when t.COLUMN_ID=1 then t2.comments end table_comments,
       t.COLUMN_ID,t.colUMN_NAME,t1.comments,case when t3.COLUMN_NAME is not null then 'Y' else NULL end primary_key
       ,t.DATA_TYPE,t.DATA_LENGTH,t.DATA_PRECISION,t.data_scale,t.nullable
  FROM User_Tab_Cols t, User_Col_Comments t1, User_Tab_Comments t2,user_cons_columns t3
WHERE t.table_name = t1.table_name
    AND t.column_name = t1.column_name
    and t.table_name=t2.table_name
    and t.table_name=t3.table_name(+) and t.COLUMN_NAME=t3.COLUMN_NAME(+) and t3.position(+)>0
    and t.TABLE_NAME='S_SALARY'
    order by t.COLUMN_ID



原标题:Oracle抓取表结构的语句

关键词:oracle

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

采伴网:https://www.ikjzd.com/w/1437
贝海国际速递:https://www.ikjzd.com/w/1438
洋码头_海外购物平台洋码头:https://www.ikjzd.com/w/1439
Buy Box黄金购物车:https://www.ikjzd.com/w/144
跨境电子商务物流服务商京华达:https://www.ikjzd.com/w/1440
跨境派:https://www.ikjzd.com/w/1441
在古巴做游轮 古巴旅游项目:https://www.vstour.cn/a/363194.html
西藏旅游攻略自驾游需要多少天 去西藏旅游自驾游要多久时间:https://www.vstour.cn/a/363195.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流