Answers for "sql server query number of rows in all tables"

SQL
0

sql query to get the number of rows in a table

select count(*) from tablename
Posted by: Guest on May-01-2020
0

sql server count all tables rows

CREATE TABLE #counts
(
    table_name varchar(255),
    row_count int
)

EXEC sp_MSForEachTable @command1='INSERT #counts (table_name, row_count) SELECT ''?'', COUNT(*) FROM ?'
SELECT table_name, row_count FROM #counts ORDER BY table_name, row_count DESC
DROP TABLE #counts
Posted by: Guest on December-05-2021

Code answers related to "sql server query number of rows in all tables"

Code answers related to "SQL"

Browse Popular Code Answers by Language