← SQL tutorial

SQL

SELECT

SELECT picks which columns you want back. * means "every column"; naming specific columns (comma-separated) returns just those.

Example: selecting specific columns

SELECT name, score FROM students;
name  | score
Ada   | 92
Chidi | 78
Musa  | 85

Naming exact columns instead of always using * matters for a real, practical reason once tables get wide — fetching only what you actually need is faster, uses less memory, and makes it obvious to anyone reading the query exactly what data it depends on.

Example
SELECT name, score FROM students;
Output
name  | score
Ada   | 92
Chidi | 78
Musa  | 85