MS SQL List of Records in All Tables

In MS SQL, run the following code to get the list of record numbers of all tables (created by the user) in a database.

SELECT [TableName] = sobj.name, [RowCount] = MAX(sind.rows) FROM sysobjects sobj, sysindexes sind WHERE sobj.xtype = 'U' AND sind.id = OBJECT_ID(sobj.name) GROUP BY sobj.name ORDER BY 2 DESC


You May Interest

How to Learn MS SQL Server Version

Making a MS SQL Offline Database Online

What are Indexed Views inside SQL Server ?

What Have INCLUDED Columns With SQL Server Indexes ?

General Information List of All Allowed Databases in MS SQL Serve ...