0

Is it possible to check for exact the same String in the where clause of MySQL query.

assuming we have the following table:

| id | name |   hash   |

| 1  | toby | abcdefgh |

the current query:

SELECT * FROM users WHERE hash = 'AbcdefgH' # Should return 0 rows

would return the same as:

SELECT * FROM users WHERE hash = 'abcdefgh' # Should return 1 row

How can i litterally check for the string case-sensitive.

any help is greatly appreciated.

p.s.w.g
  • 146,324
  • 30
  • 291
  • 331
sn0ep
  • 3,843
  • 8
  • 39
  • 63

1 Answers1

2

SELECT * FROM users WHERE BINARY hash = 'AbcdefgH' # Now returns 0 rows

sn0ep
  • 3,843
  • 8
  • 39
  • 63