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

Re: how to ignore case

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: lorid <lorid(at)dri(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: how to ignore case
Date: 2005-05-19 19:20:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Thu, 2005-05-19 at 13:52, lorid wrote:
> How can I do a simple select statement ignoring the case ? kinda like \i 
> in reg expressions ?
> thanks in advance

You can use upper/lower:

select * from table where lower(somefield) like '%abc%';


select * from table where lower ~* '.*abc.*';


In response to


pgsql-admin by date

Next:From: Scott MarloweDate: 2005-05-19 19:30:53
Subject: Re: how to ignore case
Previous:From: Jason MinionDate: 2005-05-19 19:06:08
Subject: Re: Can you generate SQL by using SQL in Postgres?

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