当前位置:网站首页>Data query language (DQL)
Data query language (DQL)
2022-07-01 18:17:00 【Born like summer flowers LXM】
DQL Three ways to query

1. Basic query
(1) Query all










(2) Query some fields

(3) Column alias

(4) Restrict queries




(5) Go to check again


(6)where Clause

(7) Relational operator ( Greater than or equal to )


(8) Logical operators ( And or not )


(9) Continuous interval query (between…and…)


(10)in and not in


(11)is null



(12) Fuzzy query


(13) Merge query








(14) Sort


(15) Aggregate functions ( Count 、 Sum up 、 Average 、 Maximum 、 Minimum )



Count



Sum up

Average

minimum value

Maximum

(16) Group query





having Clause


2. Relational query



(1) Internal connection



inner join Is a column connection
union Is row connection 
Equivalent connection







Non equivalent connection








(2) External connection

External connection : Left connection














External connection : The right connection






(3) Full connection








(4) Cross connect








Another way is to find 16 Two ways of combination 


Another way 
3. nested subqueries

The order of inquiry 

(1) Scalar subquery



(2) Column query



(3) Line sub query




(4) Table sub query





4. Subquery exercise
Case study 1



Case study 2





Case study 3





Case study 4




5. practice
























边栏推荐
- Highly reliable program storage and startup control system based on anti fuse FPGA and QSPI flash
- To improve the efficiency of office collaboration, trackup may be the best choice
- Slider verification code identification gadget display
- The latest software scheme of the intelligent information management system of the armed police force
- Pytorch crossentropyloss learning
- Yolov5 practice: teach object detection by hand
- Explain in detail the process of realizing Chinese text classification by CNN
- Growing up in the competition -- (Guangyou's most handsome cub) Pikachu walking
- Subnet division and summary
- Work and leisure suggestions of old programmers
猜你喜欢

transform. Forward and vector3 Differences in the use of forward

Work and leisure suggestions of old programmers

Gameframework eating guide
![[splishsplash] about how to receive / display user parameters, MVC mode and genparam on GUI and JSON](/img/83/9bd9ce7608ebfe7207ac008b9e8ab1.png)
[splishsplash] about how to receive / display user parameters, MVC mode and genparam on GUI and JSON
![[beauty detection artifact] come on, please show your unique skill (is this beauty worthy of the audience?)](/img/e8/f43f5583e330fbc0cb6c0188711707.jpg)
[beauty detection artifact] come on, please show your unique skill (is this beauty worthy of the audience?)

Penetration practice vulnhub range Nemesis

New patent applications and transfers
![[PHP foundation] realize the connection between PHP and SQL database](/img/eb/c8953eddfe3b19b0adb5529957d275.jpg)
[PHP foundation] realize the connection between PHP and SQL database
![Htt [ripro network disk link detection plug-in] currently supports four common network disks](/img/e4/c06b94243cdbe391b8b2124ff30789.jpg)
Htt [ripro network disk link detection plug-in] currently supports four common network disks

Heavy disclosure! Hundreds of important information systems have been invaded, and the host has become a key attack target
随机推荐
手机开户股票开户安全吗?那么开户需要带些什么?
Bug of QQ browser article comment: the commentator is wrong
Talk about the favorite tools used by project managers
Relationship between sensor size, pixel, dpi resolution, inch and millimeter
Work and leisure suggestions of old programmers
ISO 27001 Information Security Management System Certification
Set the style of QT property sheet control
At present, where is the most formal and safe account opening for futures speculation? How to open a futures account?
Technical secrets of ByteDance data platform: implementation and optimization of complex query based on Clickhouse
People help ant help task platform repair source code
On the language internationalization of Yongzhong Office
Samba basic usage
Apache iceberg source code analysis: schema evolution
DNS
【Try to Hack】vulnhub DC4
Petrv2: a unified framework for 3D perception of multi camera images
Gameframework eating guide
Depth first traversal and breadth first traversal [easy to understand]
MySQL -- explain performance optimization
Heavy disclosure! Hundreds of important information systems have been invaded, and the host has become a key attack target