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.
Loading exercise...
Loading exercise...
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:
Loading SQL editor...
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?

