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 data model, Define data model? A data model is a collection of c...

Define data model? A data model is a collection of conceptual tools for explaining data, data relationships, data semantics and consistency constraints.

Normalization, Consider a bank that has a collection of sites, each running...

Consider a bank that has a collection of sites, each running a database system. Suppose the only way the databases interact is by electronic transfer of money between one another,

Explain the need of parallel database, Probelm: a) In the context of OO...

Probelm: a) In the context of OODBMS, define the following terms with appropriate examples. (i) Object class. (ii) Abstract class. (iii) Aggregation. (iv)

What do you understand by acid, What do you understand by ACID? - ACID...

What do you understand by ACID? - ACID (Atomicity Consistency Isolation Durability) is a quality sought after in a reliable database. Here's the relevance of each quality:

Sorting field groups we cannot use more than one key field, While sorting f...

While sorting field groups we cannot use more than one key field False.

Deadlock and its prevention, Deadlock And Its Prevention: As seen earlier,...

Deadlock And Its Prevention: As seen earlier, though two phase locking protocol handles the trouble of serialisability, but it causes some troubles also. For instance, consider th

I need web security expert, I need web security expert , website management...

I need web security expert , website management Project Description: i want professional for the below . website management server management database management

Define query language, Define query language?   A query is a statement ...

Define query language?   A query is a statement requesting the retrieval of information. The portion of DML that includes information retrieval is known as a query language.

Sql, example of embedded SQL query

example of embedded SQL query

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