Re: Sql query with partial matching - Mailing list pgsql-general

From Steve Heaven
Subject Re: Sql query with partial matching
Date
Msg-id 3.0.1.32.20001212164038.00fd0bc4@mail.thornet.co.uk
Whole thread Raw
In response to Sql query with partial matching  (Travis Bauer <trbauer@indiana.edu>)
List pgsql-general
At 14:58 07/12/00 -0500, Travis Bauer wrote:
>How would I write an sql statement which would select all the
>records from a table where some string field contains
>some substring?  Example: find all the records where f1 contains
>the world "cool."

select * from table where f1 ~ 'cool';

or case insensitive

select * from table where f1 ~* 'cool';

Steve

--
thorNET  - Internet Consultancy, Services & Training
Phone: 01454 854413
Fax:   01454 854412
http://www.thornet.co.uk

pgsql-general by date:

Previous
From: Carlos Felipe Zirbes
Date:
Subject: Foreign Key constraint and Alter Table command
Next
From: Chris Jones
Date:
Subject: Re: No postgres on Solaris