On specifying a CHARACTER SET binary attribute for a character string data type, MySQL creates that column as its subsequent binary string type. The conversions for CHAR, VARCHAR and BLOB data types take place as follows −
The above kind of conversion does not occur for ENUM and SET data type and they both are created as declared while creating the table.
But now on checking the status of table, with the help of query below, we can see that MySQL has changed the data type according to its subsequent binary string.
mysql> Show Create Table EMP\G *************************** 1. row *************************** Table: EMP Create Table: CREATE TABLE `emp` ( `Name` varbinary(10) DEFAULT NULL, `Address` binary(10) DEFAULT NULL, `Designation` blob, `Field` enum('ENG','SS') CHARACTER SET binary DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec)
以上就是当我们为字符串数据类型指定 CHARACTER SET 二进制属性时,MySQL 如何反应?的详细内容,更多请关注php中文网其它相关文章!
已抢141545个
抢已抢4862个
抢已抢7644个
抢已抢22523个
抢