SQL

SELECT Statement

English

Overview

A SQL statement for retrieving data from a database.

Details

The basic SQL syntax for extracting rows and columns matching a condition from a table, used together with clauses such as WHERE, GROUP BY, and ORDER BY. The logical execution order is FROM -> WHERE -> GROUP BY -> HAVING -> SELECT -> ORDER BY, which differs from the order it's written in (starting with SELECT) -- something that affects how aliases can be used.

More Database terms