I have a scenario like
If I fired a query ,i will be getting a list of tables.In addition to that,I need to get the count of that tables.
What I thought is to make use of cursors inside a procedure,where the cursor row will process the each table once so that we can get row count for e ach table.
Please let me know if there are any better options.
I have seen the stats option but we are not sure that the stats may update.
If you need an exact count the only reliable way is to run a COUNT(*).
If doesn't have to be exact, extracting it from stats uses no additional resources.
I have a requirement to implement the same scenario you asked about. May i know how did you achieve that?