Solución:
Sí, SELECT COUNT(*) FROM TableName
select sum([rows])
from sys.partitions
where object_id=object_id('tablename')
and index_id in (0,1)
es muy rápido pero rara vez inexacto.
Utilice esta consulta:
Select
S.name + '.' + T.name As TableName ,
SUM( P.rows ) As RowCont
From sys.tables As T
Inner Join sys.partitions As P On ( P.OBJECT_ID = T.OBJECT_ID )
Inner Join sys.schemas As S On ( T.schema_id = S.schema_id )
Where
( T.is_ms_shipped = 0 )
AND
( P.index_id IN (1,0) )
And
( T.type="U" )
Group By S.name , T.name
Order By SUM( P.rows ) Desc
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)