(Information is Beautiful)

Counting number of rows

Run (Oracle)

select table_name from dba_tables where owner ='OWNERNAME';

to get the tables. Then put them in the first column of a spreadsheet. In the second column, add this formula:

="select '"&A1&"' as Tbl, count(*) as Cnt from CORE."&A1

and in the third column put “UNION”, except for the last row, that gets a “;”

Ta-da! Ready to run.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s