SQL: SELECT
Learn SELECT in SQL with practical examples.
SQL — SELECT
Overview
SELECT reads data from tables.
What you'll learn
- select columns
- LIMIT
- aliases
- basic filtering with WHERE
Syntax
SELECT col1, col2 FROM table;
Example
SELECT id, name
FROM users
WHERE active = 1
ORDER BY id DESC
LIMIT 10;
Notes
- Avoid SELECT * in production queries.
- Use indexes for WHERE columns.
Try: Open the Playground: /en/playground/sql