Re: How to count total row count for each table in entire database
when I want to count, I generate a query by using following SQL:
Select 'Select ''' || Database_Id || ''', ''' || Name || ' '', Count(*) From ' || Trim(Database_Id) || '.' || Trim(Name) || ' Union' From (Select DatabaseName, TableName From dbc.tables where databasename like 'PRD_%' and tablekind = 'T' Group by 1, 2 ) As Counting(Database_Id, Name) ;
--> Just change the databasename (here everything that starts with PRD_) --> Cut and paste the result of this query (delete the last Union of the last row) --> Executes the 'result'