By default, MySQL searches are not case sensitive (although
there are some character sets that are never case insensitive,
czech). This means that if you
, you get all column values that start with
a. If you want to
make this search case sensitive, make sure that one of the
operands has a case sensitive or binary collation. For
example, if you are comparing a column and a string that both
latin1 character set, you can use
COLLATE operator to cause either
operand to have the
latin1_bin collation. For example:
col_nameCOLLATE latin1_general_cs LIKE 'a%'
col_nameLIKE 'a%' COLLATE latin1_general_cs
col_nameCOLLATE latin1_bin LIKE 'a%'
col_nameLIKE 'a%' COLLATE latin1_bin
If you want a column always to be treated in case-sensitive
fashion, declare it with a case sensitive or binary collation.
CREATE TABLE 構文」.
Simple comparison operations (
>=, >, =, <,
<=, sorting, and grouping) are based on each
character's 「sort value.」 Characters with the
same sort value (such as ‘
ÃÂ©’) are treated as the