Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> CREATE DATABASE `testChar`
- -> ;
- Query OK, 1 row affected (0.00 sec)
- mysql> Use testChar
- Database changed
- mysql> CREATE TABLE testTable (a varchar(20));
- Query OK, 0 rows affected (0.09 sec)
- mysql> SHOW CREATE TABLE testTable;
- +-----------+--------------------------------------------------------------------------------------------------+
- | Table | Create Table |
- +-----------+--------------------------------------------------------------------------------------------------+
- | testTable | CREATE TABLE `testTable` (
- `a` varchar(20) DEFAULT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
- +-----------+--------------------------------------------------------------------------------------------------+
- 1 row in set (0.00 sec)
- mysql> ALTER DATABASE testChar CHARACTER SET utf8
- -> ;
- Query OK, 1 row affected (0.06 sec)
- mysql> CREATE TABLE testTable2 (a varchar(20));
- Query OK, 0 rows affected (0.09 sec)
- mysql> SHOW CREATE TABLE testTable2;
- +------------+-------------------------------------------------------------------------------------------------+
- | Table | Create Table |
- +------------+-------------------------------------------------------------------------------------------------+
- | testTable2 | CREATE TABLE `testTable2` (
- `a` varchar(20) DEFAULT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
- +------------+-------------------------------------------------------------------------------------------------+
- 1 row in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement