Home » SQL & PL/SQL » SQL & PL/SQL » getting counts of multiple tables with one SQL stmt (Oracle 10g and others)
getting counts of multiple tables with one SQL stmt [message #342943] Mon, 25 August 2008 10:48 Go to next message
beeky
Messages: 6
Registered: February 2007
Junior Member
As part of our quality control process we compare row counts of satellite DBs to the master DB that was used to create them.
Currently this is done with an pl/sql script that has this general form:
select count(1) from A into cnt.
message:=message || ' The count for A was ' || cnt ;
etc. for a dozen or so tables.

Is it possible to do this with pure SQL?

Thanks for any help or advice,
-=beeky
Re: getting counts of multiple tables with one SQL stmt [message #342944 is a reply to message #342943] Mon, 25 August 2008 10:51 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
UNION ALL

Regards
Michel
Previous Topic: Getting lot of invalid object
Next Topic: difference between "Create and replace", and "create"
Goto Forum:
  


Current Time: Fri Dec 02 19:06:54 CST 2016

Total time taken to generate the page: 0.15076 seconds