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

What create when a primary key combined with a foreign key, What will be cr...

What will be create when a primary key if combined with a foreign key? A primary key if combined with a foreign key it creates Parent-Child relationship between the tables that

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

Data definition language, Data Definition Language It organises the dat...

Data Definition Language It organises the data in the form of columns and rows. But what does the data field column of table accumulate? How do you describe it using SQL? Th

Data, Explain three main attributes of data.

Explain three main attributes of data.

Attribute, a set of possible data value of an attribute is called??

a set of possible data value of an attribute is called??

Create a database of a motor bike racing club, You have a friend that runs ...

You have a friend that runs a motor bike club that holds racing events at various venues on weekends, on a monthly basis. Some venues are private race tracks and some are dirt trac

Data manipulation language, Question 1 Discuss about second normal form an...

Question 1 Discuss about second normal form and third normal form Question 2 Write short note on                        1) Data Manipulation Language 2) Data Definition La

What is a relationship called when it is maintained entities, What is a rel...

What is a relationship called when it is maintained between two entities? A relationship is called Binary relationship when it is maintained between two entities.

Define the terms physical schema and logical schema., Define the terms 1) p...

Define the terms 1) physical schema 2) logical schema. Physical schema: The physical schema explains the database design at the physical level, which is the lowest level of abs

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