当前位置:网站首页>Mysql database - SQL summary (remember to pay attention to me! Come on in China!)
Mysql database - SQL summary (remember to pay attention to me! Come on in China!)
2022-07-24 06:23:00 【wheat berry】
Come on, Wuhan , Go China
Catalog
One 、 Get ready
Two 、SQL Common data types
1、 Numerical type
1) integer
2) decimal
2、 Character
3、 Date type
3、 ... and 、SQL Field constraints
1、 Six constraints
2、 Identity column ( Self growth column )
Four 、DQL(Data Query Language) Data query language
1、 Sentence order
2、 Basic query (SELECT)
(1) Query constants
(2) Query expression
(3) Query field
a. Field query in the table
b. Use the alias (AS)
c. duplicate removal (DISTINCT)
(3) Query function
a. One line function
· Character functions
· Mathematical functions
· Date function
· Process control functions
b. Group function
3、 Conditions of the query (WHERE)
(1) Operator as condition
(2) Logical expressions make conditions
(3) Fuzzy query
4、 Sort query (ORDER BY)
(1) Basic order
(2) Sort by function
(3) Sort by multiple fields
5、 Group query (GROUP BY)
(1) Group by single field
(2) Group by multiple fields
(3) Grouped by function
6、 Link query (JOIN)
(1)sql92 standard
a. Internal connection
Equivalent connection
Non equivalent connection
Self join
(2)sql99 standard
a. Internal connection (INNER JOIN)
Equivalent connection
Non equivalent connection
Self join
b. External connection (OUTER JOIN)
The left outer join (LEFT JOIN ON)
Right connection (RIGHT JOIN ON)
Full outer join (FULL JOIN ON)
c. Cross connect (CROSS JOIN)
7、 Subquery
(1) Subquery in SELECT Back
(2) Subquery in FROM Back
(3) Subquery in WHERE/HAVING Back
(4) Subquery in EXISTS Back ( Correlation subquery )
8、 Paging query (LIMIT)
9、 The joint query (UNION)
5、 ... and 、DML(Data Manipulation Language) Data operation language
1、 increase (INSERT)
1) Mode one
2) Mode two
2、 Delete (DELETE)
1) Mode one
a. Delete a single table record
b. Delete multi table records ( Connection delete )
sql92 grammar
sql99 grammar
2) Mode two
3) Compare
3、 Change (UPDATE)
1) Mode one
a. Modification sheet record
b. Modify multi table records ( Connection modification )
sql92 grammar
sql99 grammar
6、 ... and 、DDL(Data Define Language) Data definition language
1、 Library management
1) Library creation (CREATE)
2) Modification of the library (ALTER)
3) Deletion of Library (DROP)
2、 The management of the table
1) The creation of a table (CREATE)
a. Common creation
b. Copy create
c. Create with constraints
d. Create an identified column
2) The modification of table (ALTER)
3) The deletion of the table (DROP)
7、 ... and 、TCL(Transaction Control Language) Transaction control language
8、 ... and 、DCL(Data Control Language) Data control language
1、 Supplement basic user operations
2、 Create user
3、 Authorize users
4、 Revoke authority
5、 View permissions
6、 Delete user
Nine 、 View
1、 View creation
2、 View modification
3、 View delete
Link to the original text :https://blog.csdn.net/qq_37969433/article/details/102637226
come on. ! China !
official account :python treasure or DB treasure
We firmly believe that the disaster will pass ! The dawn is ahead !
边栏推荐
猜你喜欢

Unity2d game let characters move - Part 1

Lua基础

【217】#!/usr/bin/env 的意义

IP notes (6)

UE4: what is the gameplay framework

Using keras and LSTM to realize time series prediction of long-term trend memory -lstnet

leetcode 不用加减乘除算加法 || 二进制中1的个数

Unity (II) more APIs and physical engines

UE4 aiming offset

Unity2d game let characters move - next
随机推荐
Hololens 2 Chinese development document MRTK V2
数据集和预训练模型
Force buckle: 1-sum of two numbers
Unity shader: realize diffuse reflection and specular reflection
本地搭建WordPress个人博客,并内网穿透发布上线 (22)
EXCEL 生成mysql语句批量操作
【无需公网IP】为远程桌面树莓派配置固定的公网TCP端口地址
将内网映射到公网【无需公网IP】
IP笔记(11)
常见十大漏洞总结(原理、危害、防御)
ue4 换装系统3.最终成果
leetcode剑指offer JZ73 翻转单词序列
Do not rent servers, build your own personal business website (3)
Getting started with Lunix commands - user and file permissions (Chmod details)
配置固定的远程桌面地址【内网穿透、无需公网IP】
IP job (1)
Dameng database_ Trigger, view, materialized view, sequence, synonym, auto increment, external link and other basic operations
A batch of interview questions and answers_ 20180403 latest arrangement
How does the latest version of text (TMP) UI text of unity display in Chinese
微信TBS在线安装内核失败的解决方法