I have one table with some values stored in keyword column, but values inside keyword column contain extra space while retrieving the data query is not fetching all records due to this extra space I tried using trim() in mysql but it didn't work for me
Expected output: mysql query should get all records by avoiding extra space following where condition.
Table:
id keyword
1 some text for product //here single space after 'some'
2 some text for product // here two space after 'some'
Query:
SELECT * FROM `table` where trim(keyword)='some text for product'
After performing above query will return only single record not all records because of extra spaces in column values.