2022年6月29日
-
SELECT
COUNT(*)
FROM
table_name;
2.獲取多表的行數(SELECT
SELECT
'tablename1' tablename,
COUNT(*) rows
FROM
table_name1
UNION
SELECT
'tablename2' tablename,
COUNT(*) rows
FROM
table_name2;
use information_schema;
select table_name,table_rows from tables
where TABLE_SCHEMA = 'db.name'
order by table_rows desc;