ORACLE and SQL database query the amount of data

ORACLE data amount according to the account each table query:

select t.table_name,t.num_rows from user_tables t ORDER BY NUM_ROWS DESC;

SQL SERVER query the total amount of data:

SELECT SUM (number of records) AS total number of records
FROM (SELECT TOP (10000) a.name AS table, MAX (b.rows) AS number of records
                 FROM      sys.sysobjects AS a INNER JOIN
                                 sys.sysindexes AS b ON a.id = b.id
                 WHERE   (a.xtype = 'u')
                 GROUP BY a.name
                 ORDER BY number of records DESC) AS t1;

 SQL SERVER query volume data points table:

SELECT a.name AS table name, MAX (b.rows) AS number of records
FROM      sys.sysobjects AS a INNER JOIN
                sys.sysindexes AS b ON a.id = b.id
WHERE   (a.xtype = 'u')
GROUP BY a.name
ORDER BY DESC number of records

 

 

 

MYSQL query:

use information_schema;
select table_name,table_rows from tables where TABLE_SCHEMA = 'test' order by table_rows desc;

 

Guess you like

Origin www.cnblogs.com/bit-by-bit/p/12022987.html