Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

What are the difference between CHAR BINARY and BINARY type in MySQL

Answer:

For CHAR BINARY, the BINARY keyword does not cause the column to store binary value, instead, it cause the column to use binary collation only. The actual character set used depend on the system.

For BINARY column, the actual data is treated as binary, so no charset and collation rules apply.

Reference: http://dev.mysql.com/doc/refman/5.1/en/binary-varbinary.html

  1. Compare binary value in MySQL
  2. Trailing spaces of char in MySQL
  3. MySQL binary log files take all of my disk space
  4. Auto remove expired binary log in MySQL
  5. Setting the MySQL’s Binary Log Format

Leave a Reply

(required)

(required)

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>