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
Multilevel Indexing Scheme Consider the indexing scheme where the address of the block is consider in the index for each record, for a little file, this index would be little a

Question : (a) Data mining is one of the best ways to analyse data and using software method, hidden and unexpected patterns and relationships in sets of data can be extracte

Describe integrity and security? a)      Domain constraint b)      Referential integrity A value that appears in one relation for a given set of attributes also appear fo

In how many parts events are classified Events are classified as four types in UML 1.  Signals 2.  Calls 3.  Passing of Time 4.  Change in State

Can we delete data element, which is being used by table fields. No we cant delete data element.

Your OS has a set of queues, each of which is protected by a lock. To enqueue or dequeue an item, a thread must hold the lock associated to the queue. You need to implement an a


How the time stamps are implemented Use the value of the system clock as the time stamp. That is a transaction's time stamp is equivalent to the value of the clock when the tra

I have to solve a problem using access

Advantages And Drawbacks Of Ddbms  There are various reasons for building distributed database systems, with sharing of data, reliability and availability, and speedup of query