create table #emptytables
(tablename varchar(128), table_rowcount int)select
@strsql=’select distinct o.name as TableName,
.rowcnt as Table_RowCount
from sysobjects o
inner join sysindexes x
on o.id = x.id
where x.rowcnt = 0 and
o.type = ‘’U”’insert #emptytables (TableName,
Table_rowcount) exec (@strsql)
select * from #emptytables
drop table #emptytables
文章来源于领测软件测试网 https://www.ltesting.net/