MySQL composition structure and basic operations

This article gives a brief introduction to the commonly used MySQL from the first knowledge of the database.

  1. The structure of MySQL
  2. MySQL basic operations and instructions

Insert picture description here
Insert picture description hereThe above-mentioned basic operation instructions, we demonstrate in pycharm:

show databases;

create database recommend2 charset utf8;
drop database recommend2;
create database test2 charset utf8;
show variables like 'character_set_database';
drop database test2;
create database test charset utf8;
select database();
create database test;
use test;
show variables like 'character_set_database';
alter database test charset=gbk;
show databases;  #  数据库的重名名不建议修改,数据库涉及到的增删改查。

to sum up:

  1. Will create a database
  2. Will delete the database
  3. Will change the encoding format of the database,
  4. Will query the database
    basically involves so many operation items, the follow-up is to understand the data types of the database, the next article will introduce.

Guess you like

Origin blog.csdn.net/weixin_42961082/article/details/110516510