How to Get Record Count for All the Tables in SQL Server Database - SQL Server Tutorial

Published: 01 March 2015
on channel: TechBrothersIT
27,919
103

TSQL Video Scenario

How to get Table Names with Record Count in SQL Server Database?

Solution:

Consider our company is working on some audit process and they want to log the table names with record count in Audit table during different hours of the day OR we are planning for storage and want to know which table has the most records and plan the storage accordingly.

The below query will return us all the tables from SQL Server Database with record count. We will be using System tables sysindexes and sys.tables to get our record count with table names.



Blog post link with scripts
http://sqlage.blogspot.com/2015/02/ho...


On this page of the site you can watch the video online How to Get Record Count for All the Tables in SQL Server Database - SQL Server Tutorial with a duration of hours minute second in good quality, which was uploaded by the user TechBrothersIT 01 March 2015, share the link with friends and acquaintances, this video has already been watched 27,919 times on youtube and it was liked by 103 viewers. Enjoy your viewing!