The query:
SELECT users.* FROM "users" WHERE (lower(fname) || ' ' || lower(lname) LIKE '%jeff bat%') LIMIT 25
Does not return a user with fname: jeff and lname: bat
But if you run
SELECT users.* FROM "users" WHERE (lower(fname) || ' ' || lower(lname) LIKE '%jeff ba%') LIMIT 25
With one character off it does return that user. Why does the % LIKE not return exact matches? And how can I update the query to also include an exact match? Thanks
You should get the exact result by including trim function in your query like below