>
The SQL SELECT Statement
TheSELECT statement is used to select data from a database. Return employee name and city from the Employee table:
Example:
SELECT Employee_name,City FROM `employee`;
Syntax
SELECT column1, column2, ...
FROM table_name;
Here, column1, column2, ... are the field names of the table.
The table_name represents the name of the table.
Select ALL columns
If you want to return all columns, without specifying every column name, you can use the SELECT * Syntax:
Example:
Return all the columns from the Customers table:
SELECT * FROM `employee`;