SELECT
SC.Name + '.' + T.Name TableName,
SUM(P.rows) RowCnt
FROM
sys.tables T
INNER JOIN
sys.partitions P ON P.OBJECT_ID = T.OBJECT_ID
INNER JOIN
sys.schemas SC ON T.schema_id = SC.schema_id
WHERE
T.is_ms_shipped = 0 AND
P.index_id IN (1, 0)
GROUP BY
SC.Name, T.Name
ORDER BY
SUM(P.rows) DESC
Skyvia Query allows you to run SQL queries against databases and cloud applications from web browser. Access and manage your data from anywhere, build reports, arrange your data in the most informative way and simplify your decision-making process easily!
