Black
66
%Off
November
0d: 00h: 00m: 00s

🎁 Get 2 extra months of learning — completely FREE

That's 60 extra days to master new skills, build more projects, and land your dream job.

Become a PRO
Background Image

🎁 Get 2 extra months of learning completely FREE

Become a PRO
U
last year
Ursulacountry asked

Is there any difference of using SELECT with * and SELECT without *?

Kelish Rai
Expert
last year
Kelish Rai answered

Yes, there's a difference between using SELECT * and SELECT without * in SQL. Here's how they work:

1. SELECT *

The * means "select all columns" from a table. For example,

SELECT * FROM employees;

This will return all columns from the employees table.

2. SELECT without * (Selecting Specific Columns)

Instead of selecting all columns, you can specify the columns you need. For example,

SELECT name, age FROM employees;

This will return only the name and age columns, ignoring others.

Note: In real-world applications (especially large databases), it's generally recommended to select only the columns you need instead of using *. This improves performance and reduces network load.

SQL
This question was asked as part of the Learn SQL Basics course.