Selecting All Columns
The most basic SQL query retrieves all columns from a table. This is your starting point for exploring any database.
The SELECT * Syntax
SELECT * FROM table_name;
The asterisk (*) is a wildcard meaning "all columns." This is useful when you want to see everything in a table.
Practice Time
Let's practice with some guided exercises. Each exercise will check your answer automatically.
When to Use SELECT *
Using SELECT * is great for:
- Exploring a new table to see what data it contains
- Quick debugging and data verification
- Ad-hoc queries when you need all information
However, in production code, it's better to specify exact columns you need. We'll practice that in the next lesson.
Free Practice
Use the playground below to experiment freely:
Try these experiments:
- What happens if you forget the semicolon?
- What happens if you misspell the table name?
- Can you run multiple queries at once?
Up next · Lesson 3 of 27
Selecting Specific Columns
1 min read
2 of 27 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

