zoukankan      html  css  js  c++  java
  • oracle获取表字段及表注释的相关操作

    一、获取表字段:

        select *  from user_tab_columns where Table_Name='用户表' 
    

     

    user_tab_columns 为当前用户的columns,除此之外还有all_tab_columnsdba_tab_columns,这两个多了owner

     select *  from all_tab_columns where Table_Name='用户表'  and owner = 'admin'
    

     

    二、获取表注释:

    select * from user_tab_comments where Table_Name='用户表'
    

     

    同理,还有all_tab_commentsdba_tab_comments ,也多了owner

    三、获取字段注释:

    select * from user_col_comments where Table_Name='用户表'
    

     

    同理。。。

    四、获取表所有字段信息及注释:

    SELECT b.column_name columnName --字段名
    ,b.data_type dataType --字段类型
    ,b.data_length dataLength --字段长度
    ,b.data_precision dataPrecision --字段长度
    ,b.data_scale dataScale --字段长度
    ,b.NULLABLE nullable --可为空
    ,a.comments comments --字段注释
    FROM all_col_comments a --注释表
    ,all_tab_columns b --列表
    WHERE a.table_name = b.table_name and a.OWNER = b.OWNER and a.Column_name = b.Column_name and
    a.table_name = '用户表' and a.OWNER='ADMIN'
    
  • 相关阅读:
    网页定位导航
    position元素的定位
    节点属性
    css控制换行,断词
    css隐藏多余文字显示...
    重绘和回流
    CSS属性书写顺序
    模拟select
    常用html标签
    clientHeight、scrollHeight和offsetHeight基本用法
  • 原文地址:https://www.cnblogs.com/dashazia/p/11262349.html
Copyright © 2011-2022 走看看