Is SELECT harmful in Database

0 votes
Hi!!

Can someone tell me why SELECT* is considered a bad practice? Would it not mean less amount of code to change if you have added a new column?

I know that the SELECT COUNT(*) causes performance issues on some Databases, but what if it's needed on every column?
Sep 7, 2018 in Database by CodingByHeart77
• 3,750 points
872 views

1 answer to this question.

0 votes

There are really three major reasons:

  • Inefficiency in moving data to the consumer

  • Indexing issues

  • Binding Problems 

But let me tell you that it's not all bad for SELECT *. You can use for the following use-cases:

  • Ad-hoc queries

  • When * means "a row"

answered Sep 7, 2018 by DataKing99
• 8,250 points

Related Questions In Database

0 votes
1 answer

What is checkpoint in Database?

Checkpoint declares a point before which all ...READ MORE

answered Sep 4, 2018 in Database by Sahiti
• 6,370 points
1,855 views
0 votes
1 answer

Is there any boolean type in Oracle database?

Nope. I don't think there is one But ...READ MORE

answered Oct 10, 2018 in Database by Neha
• 6,300 points
995 views
0 votes
2 answers

Why is SELECT * table_name; is considered harmful?

Hi. Adding to @Tina's answer, there is ...READ MORE

answered Sep 23, 2019 in Database by Raghu
1,198 views
0 votes
1 answer

Why is SELECT * considered harmful?

If you add fields to the table, ...READ MORE

answered Sep 27, 2019 in Database by Omaiz
• 560 points
885 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by Parth
• 4,640 points
1,926 views
0 votes
1 answer

Difference between single and double quotes in SQL

Single quotes are used to indicate the ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,750 points
29,626 views
0 votes
1 answer

Can different databases use different name quotes?

This use of quotes is called delimited ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,750 points
657 views
0 votes
2 answers

Write a SQL query to find the names of employees that begin with ‘S’

Select ename From emp Where ename like"s%"; READ MORE

answered Oct 7, 2021 in Database by anonymous
27,188 views
0 votes
1 answer

What is a Join in terms of database?

JOINS are used to combine rows from ...READ MORE

answered Nov 13, 2018 in Database by DataKing99
• 8,250 points
1,058 views
0 votes
1 answer

Indexes in Database

The index is a data structure that ...READ MORE

answered Aug 20, 2018 in Database by DataKing99
• 8,250 points
1,024 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP