GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus
Go To First  |  Previous Question  |  Next Question 
 SQL Plus  |  Question 61 of 132    Print  
What is meant by SORTING and GROUPING

  
Total Answers and Comments: 3 Last Update: December 07, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 24, 2005 20:34:44   #1  
SURESH        

RE: What is meant by SORTING and GROUPING
For sorting we use order by clause in select statement. This is used to sort data in ascending order or descending order.
To group data based on perticulr column we use groupby clause.
Both are used to get distinct values.

 
Is this answer useful? Yes | No
January 02, 2006 08:13:19   #2  
ravi wadalkar        

RE: What is meant by SORTING and GROUPING

sorry to say

sorting will not give distinct values but will just sort the data depending on asceding[default]or desc.

group by will group the data depending upon the distinct values with in a column by which we are grouping


 
Is this answer useful? Yes | No
December 07, 2006 06:38:55   #3  
rampratap409 Member Since: September 2006   Contribution: 111    

RE: What is meant by SORTING and GROUPING

sorting mean puting the value in a particular order could by alhphabatic

gouping mean making a group of same type of values and displaying a single row for that group

example

select deptno sum(sal) from emp group by deptno order by 1;

first the query will select all deptno and sal then will make group of all deptno and make sum of the sal of that group then it will put the value in order of deptno


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape