Re: Case Insensitive
От | Ben Madin |
---|---|
Тема | Re: Case Insensitive |
Дата | |
Msg-id | CA+weYr33E8EuntzGdwApB2Qgrj+EZ_djtv-r0wn06yYDuLGfrQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Case Insensitive (Sameer Kumar <sameer.kumar@ashnik.com>) |
Ответы |
Re: Case Insensitive
Re: Case Insensitive |
Список | pgsql-general |
Or you can just use `ilike`:
SELECT * FROM emp WHERE ename ilike 'aaa';
cheers
Ben
On Thu, 28 Mar 2019 at 16:24, Sameer Kumar <sameer.kumar@ashnik.com> wrote:
On Thu, 28 Mar, 2019, 4:20 PM Sridhar N Bamandlapally, <sridhar.bn1@gmail.com> wrote:Hi PG-General and Pgsql-AdminCan we achieve CASE INSENSITIVE in PostgreSQL?You are perhaps migrating from another RDBMS where this kind of feature is considered a feature.I mean, need below waypostgres=# select * from emp;eid | ename-----+-------1 | aaa2 | AAA(2 rows)postgres=# select * from emp where ename='aaa';eid | ename-----+-------1 | aaa2 | AAA(2 rows)--above result is just an manual made example onlyYou can write a query with upper function:select * from emp where upper(ename)=upper('aaa');Or you can overload the "=" operator for text arguements.ThanksSridhar
Dr Ben Madin
BVMS MVPHMgmt PhD MANZCVS GAICD
Managing Director
В списке pgsql-general по дате отправления: