Re: [SQL] Partial Search

From: Wim Ceulemans <wim(dot)ceulemans(at)nice(dot)be>
To: pez(at)aiming(dot)net
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Partial Search
Date: 1999-12-01 17:03:11
Message-ID: 384554CF.924BF895@nice.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

pez(at)aiming(dot)net wrote:
>
> I am trying to do a query with a partial search but don't know the
> syntax. eg. I want the word 'buff' to find 'buffalo' in the variable
> 'city'. Can anyone give me an example?
>

select * from table where city like '%buff%';

or case insensitive:

select * from table where city ~* 'buff';

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Satyajeet Seth 1999-12-01 18:40:13 Except operation
Previous Message Tom Lane 1999-12-01 16:19:42 Re: [SQL] VACUUM PROBLEM