标签:创建 修改 数据 gen 存在 general show character database
查看已有数据库
SHOW DATABASES;
查看创建数据库scott的语句
SHOW CREATE DATABASE scott;
创建数据库scott
CREATE DATABASE scott;
创建数据库scott, 同时指定字符集UTF8
CREATE DATABASE scott CHARSET UTF8;
CREATE DATABASE scott CHARACTER SET UTF8;
创建数据库scott, 同时指定字符集UTF8, 已存在时不报错
CREATE DATABASE IF NOT EXISTS scott CHARSET UTF8;
CREATE DATABASE IF NOT EXISTS scott CHARACTER SET UTF8;
创建数据库scott, 同时指定字符集UTF8, 指定插入时按UTF8检查
CREATE DATABASE scott CHARACTER SET UTF8 COLLATE utf8_general_ci;
修改数据库scott字符集为UTF8
ALTER DATABASE scott CHARSET UTF8;
ALTER DATABASE scott CHARACTER SET UTF8;
删除数据库scott
DROP DATABASE scott;
标签:创建 修改 数据 gen 存在 general show character database
原文地址:https://www.cnblogs.com/ret688/p/12344080.html