• 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
  • 相关阅读:
    matlab之simulink仿真入门
    20160205.CCPP体系具体解释(0015天)
    logistic回归具体解释(二):损失函数(cost function)具体解释
    Java 垃圾回收之垃圾回收算法
    synchronized
    如何中断线程
    yield函数
    Linux
    notify和notifyAll的区别
    Sleep和Wait的区别
  • 原文地址:https://www.cnblogs.com/FGang/p/10668567.html
Copyright © 2020-2023  润新知