# SELECT Statement

> The SQL command that reads data out of a table.

**Field:** Software Development  
**Category:** Databases  
**Also known as:** SELECT, SQL SELECT, SELECT Query, SELECT FROM

## Think of it like

It is like asking a shop helper for things off the shelf. You say what you want and they bring it.

## Definition

A SELECT statement is the SQL command that reads data from a database. You name the columns you want after SELECT, and the table after FROM. The database sends back the matching rows as a small table. You can add parts to it. WHERE picks rows, ORDER BY sorts them and LIMIT says how many to send.

## Example

Emma wants the names of all her customers. She runs SELECT name FROM customers, and gets back one row per customer.

## Example code

```sql
SELECT name, city
FROM customers
ORDER BY name
LIMIT 10;
```

Two columns from the customers table, sorted by name, first ten rows only.

## Why it matters

It is the command people run most in SQL. Every report, search and list in an app starts with a SELECT.

## Common mistake

Using SELECT * in app code. It sends every column, even ones you never use, which is slower and breaks when columns change.

## Three principles

- **Columns, then table.** SELECT what, FROM where.
- **Add parts as needed.** WHERE, ORDER BY, LIMIT.
- **Reads, never changes.** A SELECT leaves the data as it was.

## Related terms

- [Structured Query Language (SQL)](https://learn.benibix.com/term/development/sql)
- [Database Query](https://learn.benibix.com/term/development/query)
- [WHERE Clause](https://learn.benibix.com/term/development/where-clause)
- [GROUP BY Clause](https://learn.benibix.com/term/development/group-by)
- [SQL Join](https://learn.benibix.com/term/development/join)
- [Create, Read, Update, Delete (CRUD)](https://learn.benibix.com/term/development/crud)

![A table of six orders, each with a city and an amount. An arrow marked WHERE amount > 10 keeps four of the rows and drops two. An arrow marked GROUP BY city puts the four rows into two piles, London and Paris. An arrow marked SUM(amount) turns each pile into one row: London 45 and Paris 30. The last box is the result the SELECT gives back.](https://learn.benibix.com/diagrams/dev-sql-query.svg)

---

Source: https://learn.benibix.com/term/development/select-statement
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
