phporcaffeine Posted January 24, 2007 Share Posted January 24, 2007 I had a query like this :SELECT col1, col2, col3 FROM tbl WHERE col5 LIKE 'myText'and that returned an empty result set when in fact there were rows that it should have found ...so then I googled and found something to try, when I tried this query:SELECT col1, col2, col3 FROM tbl WHERE col5 LIKE '%myText%'it worked.My question is why did '%' make a difference? I have tried to find the answer on mysql.com but no luck.-TIA Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 24, 2007 Share Posted January 24, 2007 % is the wildcard character. It means any number of characters in this spot. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.