Skip to content


Case Sensitive Query in MySQL

The default return result of MySQL query is case insensitive, e.g.

header
label

SELECT header FROM table WHERE header = "LABEL"

Result:

label

If you want the result of the query to be case sensitive. You have to add keyword “BINARY” in front of the field name.

SELECT header FROM table WHERE BINARY header = "LABEL"

Result:

null

References:

http://emba.thu.edu.tw/chiayuan/wordpress/?p=549

Posted in Other Technologies, SQL.

Tagged with , , , , , , .


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Louboutin shoes says

    i have enjoyed reading thank for sharing your story Greeting.



Some HTML is OK

or, reply to this post via trackback.