I have a sql database table name law. Which have a column name title. I want to implement search operation using LIKE query. But when I search for male from title column it also returns female. One thing to notify that my title column contains multiple of words. But i dont want to see those rows which contains female word. I used wildcard for LIKE parameter.
SELECT * FROM `laws` WHERE title LIKE "male"
You need to include male and explicit exclude female from the text.
If you want the second line you need somewhat more complicated query
db<>fiddle here