The _
(underscore) given in the SQL
query is not honored.
Example :
SELECT * FROM employee WHERE NAME LIKE '%k_p%';
This matches and brings many rows apart from rows which contain k_p
Could someone please assist on how to achieve this in SQL
and also in Hibernate
? Thanks.
Advertisement
Answer
Have you tried escaping it:
SELECT * FROM employee WHERE NAME LIKE '%k_p%';
_
instead of just _
.