Go to the first, previous, next, last section, table of contents.


Case sensitivity in searches.

By default a MySQL column is case insensitive (although there are some character sets that never are case insensitive). That means that if you search with column like 'a%'; you will get all columns that start with A or a. If you want to make this search case sensitive use something like INDEX(column, "A")=0 to check a prefix. Or STRCMP(column, "A") = 0 if the whole string should be the same.

Simple compare operations >=, >, = , < , <=, sorting and grouping are done on the characters 'sort value'. Characters with the same sort value (like E, e and é) are treated as the same character!

LIKE comparing is done on the uppercase value of each character (E == e but E <> é)

If you want column to always be treated in a case sensitive manner, declare it as BINARY. See section CREATE TABLE syntax..

If you are using Chinese data in the so-called big5 encoding you want to make all character columns BINARY. This works because the sorting order of big5 encoding characters is based on the order of ascii codes.


Go to the first, previous, next, last section, table of contents.