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


Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up