Q
Problem solve Get help with specific problems with your technologies, process and projects.

Number of rows in two tables

How do you find the difference between the number of rows in two different tables?

How do you find the difference between the number of rows in two different tables?

The only thing that comes to mind is:

select (select count(*) from table1)
      -(select count(*) from table2) as diff

If there was something more complicated about the question, then I'm sorry, I didn't catch it.

This was last published in May 2007

Dig Deeper on Oracle and SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close