SQL SELECT Statement

The SQL SELECT statement is used to retrieve data from a database table. It is one of the most commonly used SQL commands and is an essential part of any SQL query.

Syntax

SELECT column1, column2, ...
FROM table_name
WHERE condition;
    

Example

SELECT *
FROM customers
WHERE city = 'New York';
    

This example selects all columns (*) from the "customers" table where the city is "New York".

Options

There are many other options and clauses that can be used with the SELECT statement, such as JOIN, UNION, and DISTINCT. You can learn more about these and other advanced topics in our SQL tutorials and references.