-- 查看表结构(根据表名称)
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