List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:June 7 1999 2:25am
Subject:Re: Select ... where col LIKE 'data'
View as plain text  
Derek Lavine wrote:
> 
> Hi there,
> 
> I can't seem to get the LIKE clause to work. Or am I missunderstanding
> something
> 
> select * from tbl where col1like "this data";
> 
> This line selects all columns with "this data" in col1 and I was
> expecting
> 
> select * from tbl where col1like "this";
> 
> to also return the rows with "this data" in col1 and of course any other
> rows including "this" followed by other data. But I get nothing.
> 
> Any ideas. If I am using the wrong clause in the WHERE what should I
> use?
> 
> derek
> 

if you want to find all rows where col1 contains subtring "this" you
need to do:

select * from tbl where col1 like "%this%";

-- 
Sasha Pachev
http://www.sashanet.com
Thread
Select ... where col LIKE 'data'Derek Lavine7 Jun
  • Re: Select ... where col LIKE 'data'Sasha Pachev7 Jun
  • Re: Select ... where col LIKE 'data'Derek Lavine7 Jun
    • Re: Select ... where col LIKE 'data'Paul DuBois7 Jun