Mysql
Mariadb like underscore
NaHyungMin
2021. 9. 23. 12:34
우리 팀 막내가 동일 고객 이메일로 조회할 때, 데이터가 두 개가 나온다고 말해줬다.
이메일 내용을 보니, 언더스코어 문제여서 찾아서 알려줌.
SELECT *
FROM schema.dbname
WHERE email like 'te\_st@gmail.com%';
https://www.mariadbtutorial.com/mariadb-basics/mariadb-like/
MariaDB Like
In this tutorial, you will learn how to use the MariaDB like operator to search for strings that match a specific pattern.
www.mariadbtutorial.com
다른 특수문자로 하고 싶으면 위에 참고 사이트 들어가서 맨 아래escape를 찾아보면 된다.