• Case Sensitive Query in MySQL

    Posted on August 3, 2009 by in Blog, Other Technologies, SQL

    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

One Response so far.

  1. i have enjoyed reading thank for sharing your story Greeting.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>