Advertisement
Guest User

Untitled

a guest
May 27th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. mysql> CREATE DATABASE `testChar`
  2. -> ;
  3. Query OK, 1 row affected (0.00 sec)
  4.  
  5. mysql> Use testChar
  6. Database changed
  7. mysql> CREATE TABLE testTable (a varchar(20));
  8. Query OK, 0 rows affected (0.09 sec)
  9.  
  10. mysql> SHOW CREATE TABLE testTable;
  11. +-----------+--------------------------------------------------------------------------------------------------+
  12. | Table | Create Table |
  13. +-----------+--------------------------------------------------------------------------------------------------+
  14. | testTable | CREATE TABLE `testTable` (
  15. `a` varchar(20) DEFAULT NULL
  16. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
  17. +-----------+--------------------------------------------------------------------------------------------------+
  18. 1 row in set (0.00 sec)
  19.  
  20. mysql> ALTER DATABASE testChar CHARACTER SET utf8
  21. -> ;
  22. Query OK, 1 row affected (0.06 sec)
  23.  
  24. mysql> CREATE TABLE testTable2 (a varchar(20));
  25. Query OK, 0 rows affected (0.09 sec)
  26.  
  27. mysql> SHOW CREATE TABLE testTable2;
  28. +------------+-------------------------------------------------------------------------------------------------+
  29. | Table | Create Table |
  30. +------------+-------------------------------------------------------------------------------------------------+
  31. | testTable2 | CREATE TABLE `testTable2` (
  32. `a` varchar(20) DEFAULT NULL
  33. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
  34. +------------+-------------------------------------------------------------------------------------------------+
  35. 1 row in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement