码迷,mamicode.com
首页 > 数据库 > 详细

oracle常用命令

时间:2014-08-20 19:28:32      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   div   log   ef   on   sp   

  1. 表信息:
     1 SELECT tabCols.COLUMN_NAME AS "Field",
     2        tabCols.DATA_TYPE || ( || tabCols.DATA_LENGTH || ) AS "Type",
     3        cons.constraint_type as "Key",
     4        tabCols.NULLABLE AS "Null",
     5        colcomments.comments AS "Comment"
     6   FROM USER_TAB_COLS tabCols
     7  inner JOIN user_col_comments colcomments
     8     ON colcomments.TABLE_NAME = tabCols.TABLE_NAME
     9    AND colcomments.COLUMN_NAME = tabCols.COLUMN_NAME
    10   left JOIN user_cons_columns conscols
    11     on conscols.TABLE_NAME = tabCols.TABLE_NAME
    12    AND conscols.COLUMN_NAME = tabCols.COLUMN_NAME
    13   left join user_constraints cons
    14     ON cons.constraint_name = conscols.constraint_name
    15  where tabCols.TABLE_NAME = TBTEST

     

oracle常用命令,布布扣,bubuko.com

oracle常用命令

标签:style   blog   color   div   log   ef   on   sp   

原文地址:http://www.cnblogs.com/lizhanglong/p/3925299.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!