Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Count with Intersect, Union, etc.
Hello,
Is it possible to do a "select count(*)..." kind of query with an intersect or union?
Here's what I'm looking for:
select order_number from customers intersect select order_number from orders;
While this returns the values I'm looking for, I'd rather just have a count. If this is possible, how is it done?
I've tried things like:
select count(order_number) from customers intersect select count(order_number)
from orders;
but I just get "no rows selected."
I've glanced through Oracle: The Complete Reference and didn't see anything, and I've also looked through the archives at DejaNews.
Thanks,
Ryan Received on Fri Mar 27 1998 - 00:00:00 CST
![]() |
![]() |