Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Queries give impossible results
>
> just for interest:
> what is the result of
>
> select count(*) from
> (select customer_state, customer_type
> from ci_customer
> where customer_state = 'ACTIVE'
> intersect
> select customer_state, customer_type
> from ci_customer
> where customer_type <> 'PERSON');
>
> is customer_state nullable ?
> (U already mentioned that customer_state isn't)
>
Soryy, I forgot to tell that both have NOT NULL constraint.
SQL> select count(*) from
(select customer_state, customer_type
from ci_customer
where customer_state = 'ACTIVE'
intersect
select customer_state, customer_type
from ci_customer
where customer_type <> 'PERSON');
COUNT(*)
1