sql 获取每个表中的表名和记录计数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 获取每个表中的表名和记录计数相关的知识,希望对你有一定的参考价值。

BEGIN
  select "TABLE NAME"= convert (varchar (50), o.name), "ROWS"=i.rows
    from sysobjects o, sysindexes i
    where o.type = 'U'
      and o.id = i.id
      and i.indid in (0,1)
	  and i.rows>0
	 -- and i.name like '%mys%'
  order by o.name desc
END

以上是关于sql 获取每个表中的表名和记录计数的主要内容,如果未能解决你的问题,请参考以下文章