Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between group by and order by?

Answers were Sorted based on User's Feedback



What is the difference between group by and order by?..

Answer / sunil1405

Group By controls the presentation of rows , order by
controls the presentation of columns.

Is This Answer Correct ?    15 Yes 7 No

What is the difference between group by and order by?..

Answer / visakh viswanath

Difference between order by and group by having ?

suppose i have students table which has id number ,sname
varchar2(20),marks1number ,marks2 number,marks3 number,age
number.

i would like to illustrate what i understood
suppose i want to select students whose id > 2000 and age
>30

my query would be like this
select * from students where id >2000 and age >30 order by
age desc ;
or
else
select * from students group by age ,id having age >30 and
id >2000 ;

so both the queries would be same but in the first one i
use order by followed by my condition in where .
in second once i used group by which would group according
to the age or id and then having is same as where condition
in the above .

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More DB2 Interview Questions

What is meant by a unit of recovery?

1 Answers  


What is universal database?

0 Answers  


What are the levels of isolation available with DB2V4

2 Answers   IBM,


What does DML stand for and what are some examples of it?

3 Answers   IBM,


What is the difference between IN subselects and EXISTS subselect?

1 Answers   HCL, PreVator, TCS,


What is the difference between a package and a plan?

6 Answers   Infosys, L&T, Mphasis,


What is the logical entity between plan and Package?

5 Answers  


Why do chiropractors use drop table?

0 Answers  


can I alter a table (e.g. adding a column) when other user is selecting some columns or updating some columns from the same table?

1 Answers  


What is the usage of open cursor command?

0 Answers  


What does the REORG Utility do?

2 Answers  


in db2, already 10 columns arie der, and i want to insert 11th column. what parameters u wil consider for insertion and how will u insert

1 Answers   TCS,


Categories