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

Mixed fragmentation, Mixed fragmentation: Sometimes, horizontal fragmentati...

Mixed fragmentation: Sometimes, horizontal fragmentation or vertical fragmentation of a database schema by itself is insufficient to sufficiently distribute the data for some appli

Whst is logical schema, Whst is logical schema ? Logical schema is the ...

Whst is logical schema ? Logical schema is the entire database.

Create a database, The database will enable college administrators the abil...

The database will enable college administrators the ability to track students initial major. This will help college officials decide how best to prepare students for their goals an

Describe association design of an object, Describe association design of an...

Describe association design of an object by giving one suitable example of it. The Design of Associations Associations are "glue" of advanced object oriented analysis and

What is an entity relationship model, What is an entity relationship model?...

What is an entity relationship model? The entity relationship model is a set of basic objects known as entities and relationship between those objects. An entity is a thing or

Mobile database, write short note on mobile database

write short note on mobile database

Define the term database, QUESTION (a)(i) Define the term database. ...

QUESTION (a)(i) Define the term database. (ii) How is it different from a database management system? (b) What is the difference between an entity and an attribute? (c

Balance transfer, Scenario 1: Power goes out after the first instruction. ...

Scenario 1: Power goes out after the first instruction. What happens?

What are the two types of errors, What are the two types of errors? The...

What are the two types of errors? The two types of errors are: a) Logical error b) System error

Write short notes on index structure of files, WRITE SHORT NOTES ON INDEX S...

WRITE SHORT NOTES ON INDEX STRUCTURE OF FILES? There are two basic parts of indices 1.   Ordered indices 2.   Hash indices Every technique must be evaluated on the bas

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