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

Explain what is aggregation, Explain what is Aggregation? Aggregation:...

Explain what is Aggregation? Aggregation: Aggregation is an significant concept in database design whereas composite objects could be modelled during the design of database a

DSS, WHAT IS DSS? WRITE ITS REQUIREMENTS.

WHAT IS DSS? WRITE ITS REQUIREMENTS.

Database security, Ask questiwhat is row indicator in database on #Minimum...

Ask questiwhat is row indicator in database on #Minimum 100 words accepted#

Properties of a transaction , Properties of a Transaction        A tra...

Properties of a Transaction        A transaction has four main properties. These are: Atomicity Consistency Isolation or Independence Durability or Permanen

Managing databases, 10A.53 Code an Oracle Database trigger to enforce the...

10A.53 Code an Oracle Database trigger to enforce the constraint that an employee can never change his or her department. 10A.54 Code an Oracle Database trigger to allow the

Compute natural join and outer join, For the relations R and S given below:...

For the relations R and S given below: R                      S A B C 1 4 7 2 5 8 3 6 9

Access data using logical database, If one requires to access data using...

If one requires to access data using Logical Database , the use of events is unavoidable. Yes, if someone wants to access data using Logical database then the use of events

Entity relationship diagram, The Enhanced Entity Relationship Diagram (ERD)...

The Enhanced Entity Relationship Diagram (ERD) produced with a drawing or case tool. Your EERD must use a ''standard'' notation style such as Crows Foot or Chen. Please note that t

What is a primary index, What is a primary index? A primary index is an...

What is a primary index? A primary index is an index whose search key also explains the sequential order of the file.

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