Results 1 to 2 of 2

Thread: equivalent of ilike operator

  1. #1
    Join Date
    Mar 2005
    Posts
    22

    equivalent of ilike operator

    Hi,

    Looking for the pattern (pattern matching is case insensitive) then the SQL query for Oracle is

    select ename from lower(emp) where ename like lower('xad%')
    select ename from upper(emp) where ename like upper('xad%')

    In Postgres we can achieve the same result

    select ename from emp where ename ilike 'xad%'

    Is there any equivalent to ilike operator in oracle.

  2. #2
    Join Date
    Oct 2005
    Posts
    2,557
    The ilike function is a PostgreSQL extension, so no.
    http://www.postgresql.org/docs/7.4/s...-matching.html

    However, what difference does it make if you are forcing lower or upper(column name) and comparing to the corresponding upper or lower(value)? If ilike doesn't care about case, then what does it matter if you use upper or lower? Same result overall.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •