Am I doing something stupid trying to escape an underscore in LIKE?
richardh=> select * from foo;
a
-----
a_c
a_d
abc
(3 rows)
richardh=> select * from foo where a like 'a_c';
a
-----
a_c
abc
(2 rows)
richardh=> select * from foo where a like 'a\_c';
a
-----
a_c
abc
(2 rows)
richardh=> select * from foo where a like 'a\_c' escape '\\';
a
-----
a_c
abc
(2 rows)
richardh=> select * from foo where a like 'ax_c' escape 'x';
a
-----
a_c
(1 row)
- Richard Huxton
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.