The mysqlselect statement is used to query data in the database table or obtain data information in the table. This article introduces the basic syntax and basic usage examples of the mysqlselect statement to the coders, for more information, see the examples in this article. Mysql select syntax:
SELECT what_to_selectFROM which_tableWHERE conditions_to_satisfy;
What_to_select is what you want to see. it can be the column name in the database table. * indicates "all columns ".
Which_table is the table name.
The WHERE clause is optional. if the WHERE clause exists, conditions_to_satisfy specifies the conditions that the row must meet.
Mysql select instance
The following instance queries the name and sex information in the user table, and the query condition is that the sex = 1.
SELECT name, sexFROM userWHERE sex = 1;
Knowledge about this website:
Mysql tutorial
MySQL Query data