创建数据库
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name [DEFAULT] CHARACTER SET [=] charset_name
示例
1.CREATE DATABASE [IF NOT EXISTS] t1;
2.CRAETE DATABASE IF NOT EXISTS t2 CHARACTER SET = gbk;
查看当前服务器夏的数据表列表
SHOW {DATABASES | SCHEMAS} [LIKE 'pattern' | WHERE expr]
示例
1.SHOW CREATE DATABASE t1;
2.SHOW WARNINGS;
3.SHOW DATABASES;
修改数据库
ALTER {DATABASE | SCHEMA} [db_name] [DEFAULT] CHARACTER SET [=] charset_name
示例
1.ALTER DATABASE t2 CHARACTER SET = utf8;