zoukankan      html  css  js  c++  java
  • 查询 Oracle 表的基本结构(写文档)

    SELECT mdata.table_name, mdata.column_name, 
     mdata.data_type,mdata.data_length,mdata.data_precision,mdata.data_scale,
    mdata.comments,
    CASE mdata.nullable WHEN NULL THEN '非空' ELSE '' END AS nullable,edata.keytype FROM(
    SELECT utc.table_name, utc.column_name, utc.data_length,utc.data_precision,utc.data_scale, 
    utc.data_type,ucc.comments,utc.nullable FROM user_tab_columns utc,user_col_comments ucc 
    WHERE utc.table_name = ucc.table_name AND utc.column_name = ucc.column_name
    ) mdata,(
      SELECT ucc.table_name,ucc.constraint_name,ucc.column_name, case uc.constraint_type WHEN 'P' THEN '主键' ELSE '' END AS keytype FROM user_cons_columns ucc,user_constraints uc 
      WHERE ucc.constraint_name = uc.constraint_name
    ) edata WHERE mdata.table_name = edata.table_name(+) AND mdata.column_name = edata.column_name(+)
  • 相关阅读:
    实线矢量元素提取
    matlab写txt文件
    matlab之boundary()函数
    matlab之flipud()函数
    matlab unique()函数
    KD-tree
    matlab之细胞数组
    matlab的代码注释
    matlab中的try...catch...end
    (转)MySQL 加锁处理分析
  • 原文地址:https://www.cnblogs.com/ppinfo/p/2984518.html
Copyright © 2011-2022 走看看