Home > Database > Mysql Tutorial > How to query the data of a certain field in the database with mysql?

How to query the data of a certain field in the database with mysql?

青灯夜游
Release: 2020-10-02 10:26:27
Original
17745 people have browsed it

Mysql method of querying a certain field in the database: use the SELECT statement and use the "SELECT < field name> FROM < data table name>;" syntax to query; if you want to query multiple fields, Different field names can be separated by commas ",".

How to query the data of a certain field in the database with mysql?

#In MySQL, you can use the SELECT statement to query data. Querying data refers to using different query methods to obtain different data from the database according to needs. It is the most frequently used and important operation.

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

The meaning of each clause is as follows: