On this page

    Categories: String


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


    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.


    COL_LIKE example
    create table $scratch.names (name varchar, pat varchar)
    as values ('john', '%oh%'), ('jacob', '%aco%'), ('bill', '%ob%');
    select name from $scratch.names where col_like (name, pat);
    -- john
    -- jacob