order by clause by using this rows can be


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;

Request for Solution File

Ask an Expert for Answer!!
Database Management System: order by clause by using this rows can be
Reference No:- TGS0209795

Expected delivery within 24 Hours