RE: select count(*) from more than one table

RE: select count(*) from more than one table

 

  

SELECT COUNT(*) "Tablename count", 'a_user' "Tablename" from a_user
UNION ALL
SELECT COUNT(*) "Tablename count", 'b_project' "Tablename" from
b_project
ORDER BY 2;

Jerry Whittle
COINS DBA
NCI Information Systems Inc.
jerome.whittle.[Email address protected]
618-622-4145
-----Original Message-----
From: Anthony Bernardino
[mailto:oracledba-ezmlmshield-x37615808.[Email address protected]

I need to get a count(*) from two tables.
Example:
a_user and b_project.

I can't do a select count(*) from a_user, b_project because that is't
accurate.

I want the output to look like:


Tablename count Tablename
98000 a_user
1000000 b_project

Oracle LazyDBA home page