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 (=,<,>,>=,<=)
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='LLODY';
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!