pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedReplacing "LIKE" with "="
2+ messages / 2 participants
[nested] [flat]
* Replacing "LIKE" with "="
@ 2001-12-07 03:46 sharmad@goatelecom.com
2001-12-10 19:43 ` Re: Replacing "LIKE" with "=" Josh Berkus <josh@agliodbs.com>
0 siblings, 1 reply; 2+ messages in thread
From: sharmad@goatelecom.com @ 2001-12-07 03:46 UTC (permalink / raw)
To: pgsql-sql
Can I replace a query statement having a "LIKE" with a statement having "="
still getting the same functionality
Like for ex:-
SELECT * from teble_name WHERE name LIKE "%name%";
Keeping in mind the output of the query i want to replace this query with a
statement having "=" and no more "LIKE"
TIA
-Sharmad
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Replacing "LIKE" with "="
2001-12-07 03:46 Replacing "LIKE" with "=" sharmad@goatelecom.com
@ 2001-12-10 19:43 ` Josh Berkus <josh@agliodbs.com>
0 siblings, 0 replies; 2+ messages in thread
From: Josh Berkus @ 2001-12-10 19:43 UTC (permalink / raw)
To: sharmad@goatelecom.com; pgsql-sql
Sharmad,
> Can I replace a query statement having a "LIKE" with a statement
> having "="
> still getting the same functionality
>
> Like for ex:-
> SELECT * from teble_name WHERE name LIKE "%name%";
You cannot.
WIthin the SQL standard, you must use "LIKE" if you want to use
wildcards. PostgreSQL also supports the Regular Expression operator "~"
which does a different kind of pattern matching. See "Functions and
Operators" in the online PostgreSQL documentation, or purchase a copy of
"PostgreSQL: Introduction and Concepts".
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-12-10 19:43 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-12-07 03:46 Replacing "LIKE" with "=" sharmad@goatelecom.com
2001-12-10 19:43 ` Josh Berkus <josh@agliodbs.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox