CoolInterview.com - World's Largest Collection of Interview Questions
Start Your Own website Now
Interview Questions
Our Services

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!



    Send your Resume to 6000 Companies


    My site is worth $108,928.
    How much is yours worth?



  • INTERVIEW QUESTIONS ORACLE DETAILS
    Question :
    What is the difference between groupby and orderby?


    Category Oracle Interview Questions
    Rating (0.4) By 1012 users
    Added on 7/27/2006
    Views 3503
    Rate it!
    Answers:

    Group by is used to group set of values based on one or more values.
    Order by is to sort values either in ascending or descending order



    groupby is always used with having clause
    whereas we do not use having clause with orderby.



    Posted by: sumit bahuguna    

    Contact sumit bahuguna Contact sumit bahuguna

    groupby is used when we are using aggregate functions in the query but,orderby is not.



    Posted by: sivaranjani    

    Contact sivaranjani Contact sivaranjani

    Not always need aggregator function to use group by. Its can be used to find the distinct values also.

    Select emp_first_name, emp_last_name from emp
    group by emp_first_name, emp_last_name

    Did anybody experienced a situation where they had to use group by instead of DISTINCE?



    Posted by: Suresh    

    Contact Suresh Contact Suresh

    Group by clause used with group function in query, group by clause used for grouping the data.

    Order by clause used only for data ordering (ascending or descending).



    Posted by: Javaid Hussain    

    Contact Javaid Hussain Contact Javaid Hussain

    The Simplest answer is

    Order by :just sorts a column data.

    Group by : Groups it by similar data. Used for aggregation. Order by could be used inside the Grouped Items



    Posted by: OraclePassport.com    

    Contact OraclePassport.com Contact OraclePassport.com

    as order by sort the data so it can apply to a single field.but group by can be applied only when there are two or more than two fields.



    Posted by: Reet Khanna    

    Contact Reet Khanna Contact Reet Khanna

    groupby is used to retrieve the data in "GROUP" where as orderby is used to set the order of the records either in "ascending" Or "Descending"



    Posted by: Vijay Dixit    

    Contact Vijay Dixit Contact Vijay Dixit

    Order by keyword is used to sort the result set in asc & desc order.

    Group by keyword is used to group the resultset. It is used to find distinct values also.



    Posted by: prajakta pawar    

    Contact prajakta pawar Contact prajakta pawar

    If you have the better answer, then send it to us. We will display your answer after the approval.
    Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    What is the process of upgrading oracle forms /reports from older version to new versions?

    View Answer
    How many codds rule should oracle satisfies

    View Answer
    What is the difference between object library and pl/sql library

    View Answer
    List out differences between Oracle Server 9i and Oracle Server 10g.

    View Answer
    Explain truncate with restore option with example

    View Answer
    What is the difference between Anonymous Block and subprogram?
    Can we call a procedure from Anonymous PL/SQL block?


    View Answer
    How to get a calender in date field in oracle forms?

    View Answer
    I have a server with 2GB RAM.Who is the optimal size for the shared pool size
    The shared pool reserved size is 1/10 to shared pool size
    Is there a mathematic type for compute the shared pool size ?


    View Answer
    I want to know that..is there any special way to login into oracle SQL*PLUS Editor directly..Rather than every time u have enter user,password,host string...what should i do with login.sql script.. i Put it in /Bin directory..but not working..

    View Answer
    Explaint the nvl2 function

    View Answer


    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!
    Email:

    View ALL Oracle Interview Questions

    User Options
    Sponsored Links


    Copyright ©2003-2012 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions
    Page URL: http://www.coolinterview.com/interview/8560/default.asp?cachecommand=bypass


    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | Joke of the Day

    1.36
    Cache = 0 Seconds