Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Retrieving All Columns | Retrieving Data
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Introduction to SQL

bookRetrieving All Columns

Instead of listing each column, you can use the asterisk * to retrieve all columns from the table at once. This is especially useful when you need to view all the data in a table without manually typing out each column name. Here’s an example:

12
SELECT * FROM table_name;
copy
Task

Swipe to start coding

Write an SQL query to retrieve every column and every row from the country table. Use the asterisk symbol (*) to select all columns. Place your query in the space below.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 3
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you explain when it's better to use specific column names instead of *?

Are there any drawbacks to using * in SQL queries?

Can you show how to use WHERE with SELECT *?

close

bookRetrieving All Columns

Swipe to show menu

Instead of listing each column, you can use the asterisk * to retrieve all columns from the table at once. This is especially useful when you need to view all the data in a table without manually typing out each column name. Here’s an example:

12
SELECT * FROM table_name;
copy
Task

Swipe to start coding

Write an SQL query to retrieve every column and every row from the country table. Use the asterisk symbol (*) to select all columns. Place your query in the space below.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 3
single

single

some-alt