What is the best way to fetch data from table?

0 votes
There is two way to fetch the data from table. which one should i use.

a> select * from table name?

b> select coulmn1, column2,... from table name?
May 24 in Database by Shraddha
14 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey Shraddha,

I understand your doubts about fetching the data from the table. But Select * is not efficient to fetch the data. It is time-consuming and less efficient. 

So if you go for mentioning the columns in your table it will be more efficient. 

Select column1,column 2 ...from table;

I hope this answer will help you to understand the concept.

answered May 24 by Sampriti
• 620 points

Related Questions In Database

0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,140 points
48 views
0 votes
1 answer

What are the ways to get the count of records in a table

To count the number of records in ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,140 points
40 views
0 votes
1 answer

What is Data Redundancy?

Duplication of data in the database is ...READ MORE

answered Aug 16, 2018 in Database by darklord
• 6,140 points
76 views
0 votes
1 answer

What is Data partitioning?

This is the process of partitioning tables, ...READ MORE

answered Aug 22, 2018 in Database by DataKing99
• 8,100 points
61 views
0 votes
1 answer

Is it possible to access Couchbase by terminal?

What you want to accomplish isn't possible ...READ MORE

answered Apr 29, 2018 in DevOps & Agile by DareDev
• 6,710 points
33 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 parth295
• 4,600 points
103 views
0 votes
1 answer
+1 vote
3 answers

How do I check and export sonarqube analysis reports in embedded db?

Browse to sonarqube web instance to access ...READ MORE

answered Jul 2, 2018 in DevOps Tools by DareDev
• 6,710 points
1,909 views
0 votes
1 answer

How will I get all the rows from my table where name starts with 's' and ending with 'I'?

Hi Santanu, I understand your problem, You can try ...READ MORE

answered May 28 in Database by Sampriti
• 620 points
24 views
0 votes
1 answer

How to sort the data in sql ?

Hi Akash,  If you want to sort ...READ MORE

answered May 29 in Database by Sampriti
• 620 points
9 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.