SQL SELECT Statement
Syntax
The SELECT statement in SQL is used to retrieve specific columns or all columns from a table.
-- Retrieve a single columnSELECT column1FROM table_name;
-- Retrieve multiple columnsSELECT column1, column2FROM table_name;Example
-- Retrieve a single columnSELECT nameFROM employees;/* Output:| name ||------------|| John Doe || Jane Smith || Alice Brown|*/
-- Retrieve multiple columnsSELECT name, ageFROM employees;/* Output:| name | age ||------------|-----|| John Doe | 30 || Jane Smith | 25 || Alice Brown| 40 |*/