Learning notes MySQL

lliweei 2022-01-26 11:14:17 阅读数:302

learning notes mysql

Listen to the teacher today , Find a problem , It's that you don't need to know English to learn database well , Just know what this string of letters means
If a string of letters can't be read in English , Then it's probably a string of Pinyin …
Open source
Use database standard language (SQL) Database management system based on RDBMS (RDBMS)
SQL:structured Query Language
RDBMS:Relational Database managment system
advantage : Small volume , Fast , High reliability
The inevitable skill that programmers can't avoid

What is a database : Container for data
Through the suffix of a file , You can judge the type of a file , The database can be regarded as a file with a special suffix
Think of it as a Excel surface ( I don't seem to be able to Excel)

MySQL Basic command
1, View Library show databases;( Be careful to have a semicolon )
2, Create a library create databases Database name ;
3, Delete Library drop database database ;
4, Select Library use Database name ;
5, See the table show table;
6, Look at the database creation statement show create database Database name ;
7, View the selected database select database();
8, Modify database character set alter database Database name default charset=utf-8;

Database concept : A warehouse that holds organized data
surface : Structured list of data

data type
tinyint;int;float;double;decimal( High precision floating point numbers , Lengthening )
char;varchar;text;blob( Binary text , Not recommended );enum( enumeration );set
here ,char And varchar The difference between :char The length of is fixed, occupying ,varchar Is variable , Relatively speaking, it saves more space
Time type

copyright:author[lliweei],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/01/202201261114152458.html