...

/

Project: Say “Hello” to the Table

Project: Say “Hello” to the Table

Practice using the SELECT statement in SQL to retrieve data from a table and understand how queries work.

We'll cover the following...

Task

Use the SELECT statement to display all the records from a table named pets.

Press + to interact
MySQL
# Write SQL query to fetch data for pets table

If you’re stuck, click the “Show Solution” button.

Great, you did it! Now you know how to query any table.

Th pets table

The pets table stores information about different animals, like their name, type, and age.

ID

Name

Type

Age

1

Coco

dog

5

2

Luna

cat

3

3

Goldie

fish

1

What’s next?

Now that you have viewed the entire table, let’s focus on how to select specific columns of interest. Next, we’ll learn how to select only the columns that are relevant to your query.