Order by clause-data manipulation language, Database Management System

Assignment Help:

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;


Related Discussions:- Order by clause-data manipulation language

Define rotational latency time, Define rotational latency time. The ti...

Define rotational latency time. The time spent waiting for the sector to be accessed to appear under the head is known as the rotational latency time.

Set difference, Set Difference If R1 and R2 are two union compatible re...

Set Difference If R1 and R2 are two union compatible relations or relations then result of R3 =R1- R2 is the relation that have only those tuples that are in R1 but not in R2.

Gui interfaces, Draw the database using the ER approach and then make the t...

Draw the database using the ER approach and then make the tables accordingly. Populate the tables so that every table have at least 10 tuples. Then using Java and SQL, execute the

Difference between left outer join and right outer join, Difference between...

Difference between LEFT OUTER JOIN and RIGHT OUTER JOIN In left outer join tuples from the left-hand-side relation which do not match any tuple in the right-hand-side relation

Relational algebra operators, Question 1 Draw a Data Flow Diagram for a...

Question 1 Draw a Data Flow Diagram for a University scenario Question 2 Discuss the following with suitable examples Relational Algebra Operators Database Pla

I need automated trading engine for crypto currencies, Project Description:...

Project Description: Looking to prepare automated trading engine for alternate cyprto currencies starting with Cryptsy, finally integrating into other exchanges. Need to work wi

Explain the concepts of relational data model, Explain the concepts of rela...

Explain the concepts of relational data model? Relational Data Model - The relational model was first introduced through Prof. E.F. Codd of the IBM Research in the year 1970

Which are two ways that entities participate relationship, Which are the tw...

Which are the two ways in which entities can participate in a relationship? Total and partial are the two ways in which entities can participate in a relationship

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd