分类: Mysql/postgreSQL
2009-05-31 14:02:40
一、显示字符集相关的变量值
mysql> show variables like 'chara%';
+--------------------------+-------------------------------------------+
| Variable_name | Value |
+--------------------------+-------------------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | d:\mysql-5.0.9-beta-win32\share\charsets/ |
+--------------------------+-------------------------------------------+
7 rows in set (0.02 sec)
mysql> show variables like 'collation%';
+----------------------+-------------------+
| Variable_name | Value |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+----------------------+-------------------+
3 rows in set (0.00 sec)
需要说明的是: collation是与排序相关的字符集变量, 上述变量值是mysql中缺省的字符集变量。