Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

Why values with spaces do not come into search result?

As per my application requirement, while inserting data into my database table, sometime field value is added padded with spaces at its left-side and sometime at its right-side. Now, problem occurs when I try a search query to find out desired data against such specific field. MySQL shows no result against the query whereas I believe that desired data is available in the table. I assume that padded spaces with the values cause the problem. Actually, I am unable to change my application such behavior. It would be wonder if I get an idea to trim padded spaces from the field while my select queries!