SELECT
Try it yourself →Retrieves data from a table.
Syntax
SELECT column FROM table;
Description
Specifies which columns you want and which table to fetch from. * brings all columns.
Example
CREATE TABLE person(name TEXT, age INTEGER);
INSERT INTO person VALUES ('Alex', 36), ('Linus', 54);
SELECT name FROM person;Expected output
Alex Linus
When to use?
Data reading — SQL's most commonly used command.
Common mistakes
- ⚠️ A semicolon (;) is required at the end of the command.