Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL..
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)27885841Received on Mon Jan 27 1997 - 00:00:00 CST