DEV Community

Cheav Sovannarith
Cheav Sovannarith

Posted on • Originally published at Medium on

ILIKE condition in Oracle SQL

Using Case Sensitivity (alternative to **ILIKE)**

Photo by White.RainForest ∙ 易雨白林. on Unsplash

LIKE

The LIKE conditions specify a test involving pattern matching. Whereas the equality operator (=) exactly matches one character value to another, the LIKE conditions match a portion of one character value to another by searching the first value for the pattern specified by the second.

The following query finds the salaries of all employees with the name ‘SM%’. Oracle interprets ‘SM%’ as a text literal, rather than as a pattern, because it precedes the LIKE keyword:

SELECT salary 
    FROM employees 
    WHERE 'SM%' LIKE last\_name;
Enter fullscreen mode Exit fullscreen mode

ILIKE

There are noILIKEcondition in Oracle SQL, but you still can have alternative way to do it.

Using Case Sensitivity (alternative to **ILIKE)**

Case is significant in all conditions comparing character expressions that the LIKE condition and the equality (=) operators. You can use the UPPER function to perform a case-insensitive match, as in this condition:

UPPER(last\_name) LIKE 'SM%'
Enter fullscreen mode Exit fullscreen mode

REF : https://docs.oracle.com/cd/B13789_01/server.101/b10759/conditions016.htm


AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay