tags:

views:

33

answers:

2

Hi all, I know this might shock some but I just cant figure out what's wrong with this SQL statement.. it kills my head.

SELECT * FROM groups WHERE gname LIKE '%m%'; 

I am using mysql 5.1.41

+1  A: 

This statement will retrieve every column and every row from the groups table where the gname column contains a lowercase m somewhere. Is this what you wanted to achieve?

ChrisCM
thanx, ive seen it - my values (gname) are in Capital and i was comparing it with lower case m. Thnx ChrisCM
muzungu
+2  A: 

If you don't get any rows back, perhaps that's the right answer. Mistakes usually happen when your assumptions don't match the situation at hand.

Are you sure you have values in the gname column with lower case 'm' in them?

Are you sure you're running the query against the database you think you are?

duffymo
have already solved it, thnx duffymo. the problem was in the xter case...my values are in UPPERCASE ;)
muzungu
If I were you, I'd acknowledge ChrisCM by voting the answer up. I'd argue that s/he solved it, not you.
duffymo
:) my bad - Thnx ChrisCM )
muzungu