首页 > 数据库 >MySQL 2023-03-18

MySQL 2023-03-18

时间:2023-03-18 14:33:19浏览次数:38  
标签:03 set database 18 SQL character 2023 MySQL example

MySQL practice

1.create a database with name example, and set the character set to utf8
2.alter the example database, and set the character set to gbk
3.drop the example database

 

here are the SQL commands to perform the tasks you mentioned:

  1. To create a database with name example, and set the character set to utf8, use the following SQL command:
CREATE DATABASE example CHARACTER SET utf8;
  1. To alter the example database, and set the character set to gbk, use the following SQL command:
ALTER DATABASE example CHARACTER SET gbk;
  1. To drop the example database, use the following SQL command:
DROP DATABASE example;

 

1.通过UI来操作,

2.通过UI的新建query来执行命令

3.直接通过命令行mysql -u root -p

 

标签:03,set,database,18,SQL,character,2023,MySQL,example
From: https://www.cnblogs.com/chucklu/p/17230570.html

相关文章