> What is 'binary' in column type stand for?
> is it describe how the data is stored (in biner value)?
> what do we want use it for?
> - encryption ?
> - space efficiency ?
> - fast index ?
> - or ....?

AFAIK it's used for determining the behaviour while comparing values
(operators, sorting, etc.).

Normally 'Garçon' (4th character is c-cedille) and 'garcon' are seen as
identical strings if the language collation settings are set accordingly.
Characters with accents are used in many languages depending on various
circumstances (compound words, plural/singular forms, etc.); so can come in
handy to take this into consideration while handling the data. Also
upper/lower case is ignored by default (since the letter case is often
depending upon the context in which the word is used).

You can use BINARY in a column type to indicate that sorting, indexing and
comparing should always be done without taking the above into consideration;
comparing is thus done as if it were binary data: byte by byte.
You can use BINARY in an operation to indicate that this case needs to be
handled as binary data.

I've used it in one table where I wanted each record to be
case/accent-dependent unique. Now MySQL considered 'WiNTer' as different
from 'winter', etc.

Regards, Jigal.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to