zoukankan      html  css  js  c++  java
  • Oracle 查看表结构

    -- 查看表结构(根据表名称)
    SELECT T.COLUMN_NAME, T.DATA_TYPE, T.DATA_LENGTH, CASE T.NULLABLE WHEN 'N' THEN '否' WHEN 'Y' THEN '是' END NULLABLE, C.COMMENTS FROM USER_TAB_COLUMNS T,USER_COL_COMMENTS C WHERE T.TABLE_NAME = C.TABLE_NAME AND T.COLUMN_NAME = C.COLUMN_NAME AND T.TABLE_NAME = UPPER('表名称')
     
     
    -- 查询当前用户下所有表
    SELECT * FROM USER_TAB_COMMENTS WHERE TABLE_TYPE = 'TABLE'
     
    -- 查看表结构(根据表名称)带分页
    SELECT O.* FROM(SELECT ROW_NUMBER() OVER(ORDER BY COLUMN_NAME DESC) AS ROWNUM1, T.* FROM(SELECT T.COLUMN_NAME, T.DATA_TYPE, T.DATA_LENGTH, CASE T.NULLABLE WHEN 'N' THEN '否' WHEN 'Y' THEN '是' END NULLABLE, C.COMMENTS FROM USER_TAB_COLUMNS T,USER_COL_COMMENTS C WHERE T.TABLE_NAME = C.TABLE_NAME AND T.COLUMN_NAME = C.COLUMN_NAME AND T.TABLE_NAME = UPPER('表名称')) T ORDER BY COLUMN_NAME DESC ) O WHERE O.ROWNUM1 BETWEEN 1 AND 10
     
    -- 查询当前用户下所有表  带分页
    SELECT O.* FROM (SELECT ROW_NUMBER() OVER(ORDER BY TABLE_NAME DESC) AS ROWNUM1,T.* FROM (SELECT TABLE_NAME, TABLE_TYPE, COMMENTS FROM USER_TAB_COMMENTS WHERE TABLE_TYPE = 'TABLE') T ORDER BY TABLE_NAME DESC ) O WHERE O.ROWNUM1 BETWEEN 1 AND 10
  • 相关阅读:
    C#线程锁使用全功略
    viewstate 与 session 区别
    Server.MapPath() 用法
    SQL Server 存储过程
    数据库索引的概念
    从C#程序中调用非受管DLLs
    [转载]C++、C#写的WebService相互调用
    解决WCF接口无法传递object参数的问题
    UTF-8,UTF-16
    js 验证字符串是否全为中文
  • 原文地址:https://www.cnblogs.com/FGang/p/10668567.html
Copyright © 2011-2022 走看看