Closed saniales closed 6 years ago
OK just found the solution
which is by using ||
operator.
I write here hoping it is helpful
SELECT *
FROM users
WHERE email LIKE '%' || $1 || '%' --concat operator
now it is possible to pass the parameter as usual
How can I use LIKE operator in queries? Here an example
note that
$1
is an escaped parameter for%somevalue%