Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex DataLens
    • Overview
    • Formula syntax
      • All Functions
        • Overview
        • AND
        • Addition and concatenation (+)
        • BETWEEN
        • Comparison
        • Division (/)
        • IN
        • IS FALSE
        • IS TRUE
        • LIKE
        • Modulo (%)
        • Multiplication (*)
        • NOT
        • Negation (-)
        • OR
        • Power (^)
        • Subtraction (-)
      • Function Availability
    • Parameters
  • Audit Trails events
  1. Calculated fields
  2. Function reference
  3. Operators
  4. LIKE

LIKE

Written by
Yandex Cloud
Improved by
amatol
Updated at November 6, 2024

SyntaxSyntax

string_1 [ NOT ] LIKE string_2

DescriptionDescription

Matches the string string_1 to the template string_2 and returns TRUE on match.
You can specify the value in string_2 or use the % character to match a string of any length.

The string_1 NOT LIKE option returns the opposite value.

When comparing values, the function is case-sensitive. You can use LIKE along with UPPER or LOWER for case-insensitive comparison.

Argument types:

  • string_1 — String
  • string_2 — String

Return type: Boolean

ExamplesExamples

"raspberry" LIKE "%spb%" = TRUE
"raspberry" LIKE "%SPB%" = FALSE
"raspberry" NOT LIKE "%spb%" = FALSE
IF([Country] LIKE 'RU', 'Y', 'N')
IF([Phone] LIKE '+7%', 'RU', 'notRU')
UPPER("raspberry") LIKE "%SPB%" = TRUE
UPPER("West") LIKE "WEST" = TRUE

Data source supportData source support

ClickHouse 21.8, Files, Google Sheets, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, Yandex Documents, YDB.

Was the article helpful?

Previous
IS TRUE
Next
Modulo (%)
Yandex project
© 2025 Yandex.Cloud LLC