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
What is data block? Data Block - In oracle the data blocks are referred to as tablespaces. A tablespace is an fields of disk consisting of one or more disk files. A tablespace

Retrieve the S&S In-Chapter Database (in Microsoft Access format) from the text's Web site (or create the tables in Table 4-5 in a relational DBMS product). Write queries to answer

Explain Record Based Logical Models? Record-Based logical Models: Also define data at the conceptual and view levels. Unlike object-oriented models, are used to state overall

The C_Artist  application will be developed using the C language (C99 standards) and will be able to compile without warnings and link and run in the Swinburne computer laboratorie

Process of normalization is the integral part of designing a database. Justify this statement with suitable database design

Record based Logical Models: Use records as the key data representation components Examples: Relational Model: It shows data as well as relationship between data in the form

What is an ER diagram? Why is it used in Database management system (DBMS)?

How persistent programming languages differ from traditional programming languages? Database languages vary from traditional programming languages in that they directly manipul

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

Normal 0 false false false EN-US X-NONE X-NONE