MySQL “binary” vs “char character set binary”
问题 What's the difference between binary(10) vs char(10)character set binary ? And varbinary(10) vs varchar(10)character set binary ? Are they synonymous in all MySQL engines? Is there any gotcha to watch out for? 回答1: There isn't a difference. However, there is a caveat if you're storing a string. If you only want to store a byte array or other binary data such as a stream or file then use the binary type as that is what they are meant for. Quote from the MySQL manual: The use of CHARACTER SET