Skip to main content
Version: 24.3.x

Categories: String

COL_LIKE

Tests whether an expression column matches a pattern column. Comparisons are case-sensitive.

Syntax

COL_LIKE(expression_col varchar, pattern_col varchar) → boolean

  • expression_col: A column containing an expression to compare.
  • pattern_col: A column containing the pattern to compare to the expression.

Examples

COL_LIKE example
create table <catalog-name>.names (name varchar, pat varchar)
as values ('john', '%oh%'), ('jacob', '%aco%'), ('bill', '%ob%');

select name from <catalog-name>.names where col_like (name, pat);

-- john
-- jacob