The order and main functions of SELECT query statements

Source: Internet
Author: User

SELECT query statement and all its clauses

Sequential Number

Clause keywords

Sub-sentence skill

1

Select

Extracts data from the specified column from the specified table

2

From

Table to be queried

3

Where

Specifies the criteria for selecting a query.

4

Group

Grouping result sets, often used together with aggregate Functions

5

Having

Returns the number of rows in the selected result set.

6

Order

Search criteria of the specified group

If some query clauses shown in Table 8-2 are used in the same SELECT query statement, the query clauses are sorted in ascending order according to their sequence numbers. Therefore, the complete SELECT query statement can be expressed:

Select select_list

From table_source

[Where search_condition]

[Group by group_by_expression]

[Having search_condition]

[Order by order_expression [ASC | DESC]

The part in [] is optional.

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.