CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;數據庫
CREATE DATABASE 的語法:編碼
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name
[create_specification [, create_specification] ...]code
create_specification:
[DEFAULT] CHARACTER SET charset_name
| [DEFAULT] COLLATE collation_nameci
更改數據庫的字符編碼io
ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_
general_ci
字符編碼