Home  >  Article  >  Database  >  Basic usage of MySQL SELECT statement

Basic usage of MySQL SELECT statement

Guanhui
GuanhuiOriginal
2020-05-28 14:47:414816browse

Basic usage of MySQL SELECT statement

Basic usage of MySQL SELECT statement

Among the database operation statements, the most frequently used and considered the most important is the SELECT query statement , the syntax of this statement is "SELECT * FROM table_name", the "*" in the statement represents querying all fields, and "table_name" represents the table to be queried.

The basic format of the SELECT statement is:

SELECT 要查询的列名 FROM 表名字 WHERE 限制条件;

SELECT statements often have WHERE restrictions to achieve more precise queries. WHERE restrictions can have mathematical symbols (=,6580843315dd7804e35fd3743df832ea,>=,<=)

For example:

SELECT name,age FROM employee WHERE age>25;

or find the name of an employee named Mary, age and phone:

SELECT name,age,phone FROM employee WHERE name=&#39;LLODY&#39;;

Video tutorial recommendation

Boolean Education Yan Shiba mysql advanced video tutorial

Geek Academy mysql video tutorial

PHP database programming from zero-based entry to proficiency

Article recommendation: "MySQL tutorial

The above is the detailed content of Basic usage of MySQL SELECT statement. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn