I want to find the exact word from a string, for example
id Description
1 This is nice pen looking good
2 This is nice pendrive looking good
Search string :pen
My current request
SELECT * FROM `table` WHERE Description like '%pen%';
Above the query, return both records, but I want only the first record. Because the word pen exactly matches my search bar.
Expected Result
1 This is nice pen looking good
Demo
source
share