Home > Database > Mysql Tutorial > body text

What is the use of database query statement select?

青灯夜游
Release: 2020-10-19 11:10:46
Original
27621 people have browsed it

The database query statement select is used to select data from the table, and the results are stored in a result table (called a result set); the syntax format is "SELECT [column name] FROM table name [WHERE clause and other restrictions];".

What is the use of database query statement select?

(Recommended tutorial: mysql video tutorial)

SELECT statement

The SELECT statement is used to select data from a table.

The results are stored in a results table (called a result set).

The syntax format of SELECT is as follows:

SELECT
{* | <字段列名>}
[
FROM <表 1>, <表 2>…
[WHERE <表达式>
[GROUP BY <group by definition>
[HAVING <expression> [{<operator> <expression>}…]]
[ORDER BY <order by definition>]
[LIMIT[<offset>,] <row count>]
]
Copy after login

Among them, the meaning of each clause is as follows: