select name ,记录数 from
(
select s.name,
(select rowcnt from sysindexes where id=s.id and status=0 )as 记录数
from sysobjects s where xtype='U'
) s2 where s2.记录数>0
sqlserver 中获取所有有记录的表
最新推荐文章于 2023-06-16 09:01:06 发布
select name ,记录数 from
(
select s.name,
(select rowcnt from sysindexes where id=s.id and status=0 )as 记录数
from sysobjects s where xtype='U'
) s2 where s2.记录数>0