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: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
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: Sun Feb 16 06:46:46 CST 2025