当前位置:网站首页>MySQL advanced SQL statement (1)
MySQL advanced SQL statement (1)
2022-07-04 01:51:00 【kiroct】
select High level statements
Case study : Start with a database



DISTINCT : Do not display duplicate data records




function
Aggregate functions



String function



Group by Use !
Yes group by The query results of the following fields are summarized and grouped , Usually used in combination with aggregate functions
group by There is a principle , Namely SELECT In all the following columns , Columns that do not use aggregate functions , Must appear in GROUP BY Back .
HAVING: Used to filter by GROUP BY Statement returned recordset , Usually with GROUP BY Statements are used in conjunction with


create view : View , It can be thought of as a virtual table or a storage query .
The difference between a view and a table is , There are actually stored data records in the form , The view is a framework based on tables , It itself does not actually store data records . The temporary table disappears automatically when the user exits or loses the connection to the database , And the view doesn't disappear . Views don't contain data , Just store its definition , Its purpose - It can generally simplify complex queries . For example, you need to query several tables , But also to carry out statistical sorting and other operations SQL Sentences can be cumbersome , Join several tables with views , Then query the view , It's the same as querying a table , Very convenient .

A small summary :
边栏推荐
- TP5 automatic registration hook mechanism hook extension, with a complete case
- Yyds dry goods inventory it's not easy to say I love you | use the minimum web API to upload files
- Huawei BFD and NQA
- Mobile phone battery - current market situation and future development trend
- Logical operator, displacement operator
- Hamburg University of Technology (tuhh) | intelligent problem solving as integrated hierarchical reinforcement learning
- ThinkPHP uses redis to update database tables
- [leetcode daily question] a single element in an ordered array
- Jerry's synchronous weather information to equipment [chapter]
- What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
猜你喜欢

How to delete MySQL components using xshell7?

Introduction to superresolution

Remember a lazy query error
![The contact data on Jerry's management device supports reading and updating operations [articles]](/img/89/d36e785bd94c2373c34fb95eee3a9c.jpg)
The contact data on Jerry's management device supports reading and updating operations [articles]

Applet graduation project is based on wechat classroom laboratory reservation applet graduation project opening report function reference

MySQL statement learning record

The automatic control system of pump station has powerful functions and diverse application scenarios

Some other configurations on Huawei's spanning tree

Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends

Will the memory of ParticleSystem be affected by maxparticles
随机推荐
C import Xls data method summary III (processing data in datatable)
Neo4j learning notes
Portable two-way radio equipment - current market situation and future development trend
Software product download collection
Jerry's modification setting status [chapter]
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
Do you know the eight signs of a team becoming agile?
[typora installation package] old typera installation package, free version
Rearrangement of tag number of cadence OrCAD components and sequence number of schematic page
A. Min Max Swap
Mobile phone battery - current market situation and future development trend
Winter vacation daily question -- a single element in an ordered array
Jerry's watch listens to the message notification of the target third-party software and pushes the message to the device [article]
Prose article appreciation - the rain in the warm country has never changed into cold, hard and brilliant flowers. Knowledgeable people think he is monotonous, and he thinks he is unlucky, doesn't he?
求esp32C3板子連接mssql方法
Introduction to graphics: graphic painting (I)
Pyinstaller packaging py script warning:lib not found and other related issues
IPv6 experiment
Use classname to modify style properties
0 basic learning C language - nixie tube dynamic scanning display