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
47 views

1 answer to this question.

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
• 1,100 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,170 points
481 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,170 points
96 views
0 votes
1 answer

What is the rule to use group by, having and where clause?

Hi samar, this is a very common mistake ...READ MORE

answered Jul 2 in Database by anonymous
57 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,810 points
51 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,640 points
213 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,810 points
5,001 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
• 1,100 points
58 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
• 1,100 points
34 views