Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Queries give impossible results

Re: Queries give impossible results

From: Jake S <nospam_at_nospam.net>
Date: Fri, 15 Nov 2002 05:59:58 GMT
Message-ID: <y30B9.21$Ph.832@read2.inet.fi>


>
> 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

Received on Thu Nov 14 2002 - 23:59:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US