Tuesday 31 December 2019

SQL Query Table Name with Rows Counts


SELECT
    TableName = t.NAME,
    TableSchema = s.Name,
    RowCounts = p.rows
FROM
    sys.tables t
INNER JOIN
    sys.schemas s ON t.schema_id = s.schema_id
INNER JOIN     
    sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
    sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
WHERE
    t.is_ms_shipped = 0

GROUP BY
    t.NAME, s.Name, p.Rows
ORDER BY
    s.Name, t.Name 

1 comment:

  1. Mega Man: The Wily Wars (2020) (PC) - Casinoowed
    Mega Man: The Wily 바카라사이트 Wars is the sequel to Batman: Arkham 카지노사이트 Asylum, it has a single game, The Lost Dimension, which is the last major release

    ReplyDelete