SQLServer:
select a.name as 表名, max(b.rows) as 记录条数 from sysobjects as a, sysindexes as b
where a.id = b.id and a.xtype = 'u'
group by a.name
order by max(b.rows) desc;
或者
select a.name as 表名, b.rows as 记录条数 from sysobjects as a, sysindexes as b
where a.id = b.id and a.xtype='u'
order by b.rows desc;
MySql:
select table_name, table_rows from `tables`
where TABLE_SCHEMA = 'infcn'
order by table_rows desc;