Mega Code Archive

 
Categories / MySQL / Table Index
 

ALTER column to BINARY

mysql> mysql> CREATE TABLE test5(first_name CHAR(10)); Query OK, 0 rows affected (0.00 sec) mysql> mysql> INSERT INTO test5(first_name) VALUES ('Nkosi'); Query OK, 1 row affected (0.00 sec) mysql> mysql> mysql> ALTER TABLE test5 CHANGE first_name first_name CHAR(10) BINARY; Query OK, 1 row affected (0.01 sec) Records: 1  Duplicates: 0  Warnings: 0 mysql> mysql> SELECT first_name FROM test5 WHERE first_name='nkosi'; Empty set (0.00 sec) mysql> mysql> drop table test5; Query OK, 0 rows affected (0.00 sec)