Re: [SQL] How to Make Case InSensitive???

From: David Hartwig <daveh(at)insightdist(dot)com>
To: "S(dot)Ramaswamy" <srswamy(at)giasdl01(dot)vsnl(dot)net(dot)in>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] How to Make Case InSensitive???
Date: 1998-09-01 16:21:34
Message-ID: 35EC1F0E.F300470F@insightdist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

S.Ramaswamy wrote:

> When I use SQL statements, how can I make it case insensitive. If I
> use
>
> SELECT * FROM series WHERE NAME='India'
>
> I want to select rows including those where NAME='INDIA' / NAME =
> 'india'
> and so on.
>
> Can someone help me in the above??

SELECT * FROM series WHERE upper(NAME) = 'INDIA'
or
SELECT * FROM series WHERE NAME ~* '^india$'

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Leslie Mikesell 1998-09-01 17:24:33 rename table - primary key index?
Previous Message S.Ramaswamy 1998-09-01 16:02:15 How to Make Case InSensitive???