Solved

To find the count of rows returned by minus in oralce

Posted on 2004-03-27
2
487 Views
Last Modified: 2008-03-03
hi,

select * from a
minus
select * from b

here how to find the no. of rows returned by the above query.

thanks in advance

Regards

S.Djeanthi
0
Comment
Question by:djeanthi
  • 2
2 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 25 total points
Comment Utility
have you tried

select count(*) from (
select * from a
minus
select * from b
) as C


?
0
 
LVL 50

Expert Comment

by:Lowfatspread
Comment Utility
you could also restructure the query to use not exists

e.g.

select count(*)
 from a
 where not exists (select * from b
    where a.primary key = b.primary key)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now