Home > Database > Mysql Tutorial > body text

Basic usage of MySQL SELECT statement

Guanhui
Release: 2020-05-28 14:47:41
Original
4931 people have browsed it

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 限制条件;
Copy after login

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

For example:

SELECT name,age FROM employee WHERE age>25;
Copy after login

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

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template