select *
where email ilike 'example@sqldat.com'
ilike tương tự như like nhưng không phân biệt chữ hoa chữ thường. Đối với ký tự thoát, hãy sử dụng replace()
where email ilike replace(replace(replace($1, '~', '~~'), '%', '~%'), '_', '~_') escape '~'
hoặc bạn có thể tạo một hàm để thoát văn bản; cho mảng sử dụng văn bản
where email ilike any(array['example@sqldat.com', 'example@sqldat.com'])