Get all the counts of the tables in the particular database into a table

Database
KVB
N/A

Get all the counts of the tables in the particular database into a table

Hi

I have a requirement like I need to get the tablename and their counts of a particular database into a table.

I am able to count each table count individually.Can we do it in using SQL only?

Regards

KVB

1 REPLY
N/A

Re: Get all the counts of the tables in the particular database into a table

Hi KVB,

this topic has been covered several times, you might use:

  • a cursor plus Dynamic SQL in a Stored Procedure to get the exact count
  • simply extract it from the stats if the count doesn't have to be exact

Dieter