3 different way to find row count of a table ? TIP #45



Many times you want to know how many rows exists in the particular tables.

So let me share 3 different way to know this thing


Let me share 3 different options

Option 1:-

You all aware of this term which is Count function

SELECT COUNT(1)  As Rows FROM [Person].[Person]

Option 2:-

Sp_Space used is another way to determine rows in table as shown in below figure


Option 3:-

it is little bit tricky but you will enjoy seeing this. We count the row number from cluster index



I hope you enjoyed.

Thanks & Enjoy !!!


Leave a Reply

Your email address will not be published. Required fields are marked *