Solved

To find the count of rows returned by minus in oralce

Posted on 2004-03-27
2
489 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
ID: 10697607
have you tried

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


?
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 10697613
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about achieving the basic levels of HRIS security in the workplace.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
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…

809 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