Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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.



pgsql-novice by date

Next:From: James HallDate: 2000-08-01 20:51:07
Subject: copying pg_user?
Previous:From: David WilleyDate: 2000-08-01 15:10:22
Subject: NOVICE - Wildcard query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group