Say “Hello” to the Table

Run your first SQL query and view full table data.

Welcome to SQL. In this first lesson, you’ll write a simple query to interact with a table and retrieve data—no setup or background required. Let’s get started with your first real query.

Goal

You’ll aim to:

  • Run your first SQL query.

  • View a whole table using SELECT *.

  • Understand the idea of a table as structured data.

Meet the table

Let’s start with a table called people that stores basic information about different individuals, like their name, age, and city. Here’s what it looks like:

The people table

ID

Name

Age

City

1

Aisha

30

Karachi

2

Dan

24

New York

3

Fatima

27

Lahore

4

Lee

22

Seoul

Say hello with SELECT *

You’re asking SQL to show everything from the people table: every column, every row.

Press + to interact
MySQL
SELECT * FROM people;

Congratulations! You just pulled an entire table using one line of code!

📝 Did you know?
This query works just fine without the semicolon at the end—it’s optional in many environments when running a single statement. And it also works even if you write it in lowercase. That’s because SQL is case-insensitive, so select, SELECT, or even SeLeCt all mean the same thing.

Quick bits

  • SELECT: Ask for columns.

  • *: Wildcard for all columns.

  • FROM: The table you’re asking.