Re: NOVICE - Wildcard query

From: Dave_Pfaltzgraff(at)patapsco(dot)com
To: pgsql-novice(at)hub(dot)org
Subject: Re: NOVICE - Wildcard query
Date: 2000-08-01 17:50:43
Message-ID: 8525692E.00620782.00@patapsco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Dave Pfaltzgraff(at)PATAPSCO
08/01/2000 01:50 PM

David Willey <dwilley(at)engr(dot)psu(dot)edu> asks:

>How does one make a wildcard query? For example:
>SELECT * FROM contact_table WHERE fname="Dav*";

Here's where you need the LIKE operator:
SELECT * FROM contact_table WHERE fname LIKE "Dav%";

The underscore '_' matches any single charactetr, the percent sign '%' matches
any sequence of characters.

Browse pgsql-novice by date

  From Date Subject
Next Message James Hall 2000-08-01 20:51:07 copying pg_user?
Previous Message David Willey 2000-08-01 15:10:22 NOVICE - Wildcard query