Order by clause-data manipulation language, Database Management System

Order by clause

  • By using this rows can be sorted
  • It is used in the last portion of select statement
  • By default it gets ascending order
  • DESC: is used for sorting in descending order
  • Sorting by column Alias
  • Sorting by column which is not in select list is possible

Example:

SELECT EMPNO, ENAME, SAL*12 "ANNUAL" FROM EMP

ORDER BY ANNUAL;

Example:   //Sorting by multiple columns//; ascending order on department number and descending order of salary in each department.

SELECT ENAME, DEPTNO, SAL FROM EMP

ORDER BY DEPTNO, SAL DESC;

Posted Date: 3/11/2013 1:07:16 AM | Location : United States







Related Discussions:- Order by clause-data manipulation language, Assignment Help, Ask Question on Order by clause-data manipulation language, Get Answer, Expert's Help, Order by clause-data manipulation language Discussions

Write discussion on Order by clause-data manipulation language
Your posts are moderated
Related Questions

(A) For the relation; CarSales (RegNo, BuyerName, Address, SalesPerson, Make, Model, Commission) The following functional dependences hold, RegNo _ID à Make, Model Reg

A field-groups statement or an insert statement reverses storage space and transfers values. False.

Adding Redundant Associations for Efficient Access The expression redundant association means using "duplicate association for proficient access". While analysis, it is not a

Explain the term - Handling Boundary Condition These are some circumstances that to be handled in any system initialization and termination. Describes how system is bro

Attributes that are directly kept in the data base. For example, 'Birth date' attribute of a person.   Derived  Attributes that are not stored directly but can be derived

Define and differentiate between ordered indexing and hashing. Ans: Ordered indexing: To gain fast random access to records in a file, we can make of an index structure. Every

Part: Recommended (Non-query) Optimisations This section entitled "Recommended (non-query) optimisations" should be a brief report containing recommended optimisations you would

Question 1 Create a table student with attributes student name, roll number, total marks and percentage. Do the following operations Insert details in to the table Update

management information system based on functional organisation