any help on sql query for record counts on various tables in a table
Hi I have bunch of tables collected from a database and tabulated them in a table Could you please let me know what is best sql or method to get record counts on each table in the table i created and listed them
select k.x from ( Select substr('''',1,1)||a.tablename||substr('''',1,1) c, a.tablename q, ',count(*) from '||q p,'insert into table2 select'||' '||c||p||';' x From ( Select Distinct Trim(databasename)||'.'||Trim(tablename) tablename From dbc.tables Where tablekind='T') a ) k
step 3: run this result set in one shot.
Here I have taken example of all the database table u can modify u'r query accordingly.