By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
SELECT 'a_c' AS col
INTO tab
UNION ALL SELECT 'abc'
2 rows affected
SELECT *
FROM tab
WHERE col LIKE 'a_c'
col |
---|
a_c |
abc |
SELECT *
FROM tab
WHERE col LIKE 'a\_c' ESCAPE '\'
col |
---|
a_c |
SELECT *
FROM tab
WHERE col LIKE 'a\_c' {escape '\'}
col |
---|
a_c |