Oracle查询库中记录数大于2千万的所有表 假如当前用户拥有select any table权限,则可以使用下列sql语句: select table_name, num_rows from dba_tables t where t.owner = upper('hr') and num_rows > 20000000; 或 select table_name, num_rows from all_tables t where t.owner = upper('hr') and num_row
查询所有表名:select t.table_name from user_tables t;查询所有字段名:select t.column_name from user_col_comments t;查询指定表的所有字段名:select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询指定表的所有字段名和字段说明:select t.column_name, t.column_name from
转自 :http://gis-conquer.blog.sohu.com/170243422.html 查询所有表名:select t.table_name from user_tables t; 查询所有字段名:select t.column_name from user_col_comments t;查询指定表的所有字段名:select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询指定
查询所有表名:select t.table_name from user_tables t;查询所有字段名:select t.column_name from user_col_comments t;查询指定表的所有字段名:select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询指定表的所有字段名和字段说明:select t.column_name, t.column_name from
SELECT * FROM (SELECT Sql_Text, Sql_Id, Cpu_Time FROM V$sql ORDER BY Cpu_Time DESC) ORDER BY Rownum ASC; SELECT * FROM (SELECT Sql_Text, Sql_Id, Cpu_Time FROM V$sqlarea ORDER BY Cpu_Time DESC) ORDER Byrownum ASC; 这2个语句效果基本一样,一个从v$sql视图查询一个从v$sqlarea视
表数目:select count(1) from sysobjects where xtype='U' 视图数::select count(1) from sysobjects where xtype='V' 存储过程数: select count(1) from sysobjects where xtype='P' 表详细信息:SELECT * FROM sysobjects WHERE xtype = 'U' C = CHECK 约束 D = 默认值或 DEFAULT 约束 F = FORE
select table_name from user_tables a where not exists (select * from user_constraints b where b.constraint_type = 'P' and a.table_name = b.table_name) 转载:http://blog.itpub.net/20893244/viewspace-2132149/
1.进去指定schema 数据库(存放了其他的数据库的信息) mysql> use information_schema; 2.查询所有数据的大小 mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES; 3.查看指定数据库实例的大小,比如说数据库 yoon mysql> select concat(round(sum(DATA_LENGTH/1024
dba_data_files:数据库数据文件信息表.可以统计表空间大小(总空间大小). dba_free_space:可以统计剩余表空间大小. 增加表空间即向表空间增加数据文件,表空间大小就是数据文件总大小. 检查Oracle各个表空间的增长情况(各表空间使用率) select A.tablespace_name,(1-(A.total)/B.total)*100 used_percent from (select tablespace_name,sum(bytes) total from db
--表名,表占用空间大小(MB),行数select table_name, round(num_rows * avg_row_len /1024/1024, 8) as total_len, num_rows from user_tables where table_name = '表名' order by table_name; --表名,列名,列占用空间大小(MB),非空行数 select c.table_name, c.column_name, round((t.num_rows - c.