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
Process of Adjustment of inheritance During object design, inheritance is readjusted by rearranging classes and operations, and abstracting common behaviour.

A distributed transaction consists of subtransactions that execute at different sites and access local DBMSs at those sites. For example, a distributed transaction that transfers m

what is database management system? & why it is required?

What is Explicit update In explicit update, each derived attribute is defined with respect to one, or more fundamental base object(s). The object designer determines that de

1. Which relational algebra operations do not need the participating tables to be union-compatible? Ans: Join is the relational algebra operations that do not need the particip

What does Aggregation mean?

What kind of advantages to copying records from one table to another? -) When an algorithm that modifies a table is used after that it's safer to work with the copy -) When

what is query processing ,query optimization and performance turring?

I need a help with my assignment of data envelopment analysis which is due for submission next week on monday the 10th Dec. Will you be able to help so that I can submit it on tim

Compare the Nested-loop join and block-nested loop join Ans: Nested  loop join - It is costly as worst case cost, no. of block accesses needed is n r * b s + b r   where b