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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL..

Re: SQL..

From: Lun Wing San (Oracle) <wslun_at_qrc.org>
Date: 1997/01/27
Message-ID: <32ED207B.1679@qrc.org>#1/1

Stella wrote:
>
> Why no rows selected when I have this statement?
>
> select desc, code from table_a where name = 'ABC'
> and code like '3%' and code like '7%' ;

  If you code like 3%, it will not be like 7%. It is a contradiction. As a result, no rows will be returned. Alternatively, you may mean:

  code like '3%' or code like '7%' OR   

  code like '%3%' and code like '%7%'

---
Name   : Lun Wing San
Title  : Oracle Application Developer of Hong Kong Productivity Council
         Oracle Database Administrator and System Administrator of QRC
Phone  : (852)27885841
Received on Mon Jan 27 1997 - 00:00:00 CST

Original text of this message

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