If you are referring to SQL Server, then how about this:
select rowcnt,name from sysindexes where name in ('a_user','b_project')
Mark Clemmons
Associate Director of Data Warehouse and Database Services
US Oncology
-----Original Message-----
From: Anthony Bernardino
[mailto:oracledba-ezmlmshield-x37615808.[Email address protected]
Sent: Monday, July 03, 2006 2:12 PM
To: LazyDBA Discussion
Subject: select count(*) from more than one table
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
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
-----------------------------------------
The contents of this electronic mail message and any attachments
are confidential, possibly privileged and intended for the
addressee(s) only. Only the addressee(s) may read, disseminate,
retain or otherwise use this message. If received in error, please
immediately inform the sender and then delete this message without
disclosing its contents to anyone.
Oracle LazyDBA home page