Solved

To find the count of rows returned by minus in oralce

Posted on 2004-03-27
2
490 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server memory sizing - reallocation 16 78
T-SQL Default value in Select? 5 37
Coldusion - DATA insert syntax problem 12 49
Perl Versus AWK? 7 45
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Read about achieving the basic levels of HRIS security in the workplace.
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…

790 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