Order by clause-data manipulation language, Database Management System

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;

Posted Date: 3/11/2013 1:07:16 AM | Location : United States







Related Discussions:- Order by clause-data manipulation language, Assignment Help, Ask Question on Order by clause-data manipulation language, Get Answer, Expert's Help, Order by clause-data manipulation language Discussions

Write discussion on Order by clause-data manipulation language
Your posts are moderated
Related Questions
Modular growth: In distributed environments, it is simple to expand. Latest sites can be added to the network without affecting the operations of other sites, as they are somewhat

Event Occurrence of a process is called event. In other words, the object can receive many input instructions. The changes which occur due to these instructions are known as e

1.  Define each of the following IN YOUR OWN WORDS: (a)   File: (b)   Record: (c)   Field: (d)   Primary Key: (e)   Secondary Key: 2.  A travel agency wants t

Define rotational latency time. The time spent waiting for the sector to be accessed to appear under the head is known as the rotational latency time.

Define Timestamp ordering Ans In timestamp-based method, a serial order is made among the concurrent transaction by assigning to every transaction a unique nondecreasing number

let us consider a table having 2200 records and the fixed size of the table to be considered as 25.then how many numbers of table is requredto perform horizontal fragmentation

Define tuple variable Tuple variable is a type of variable whose domain is the set of all tuples.

Describe the types of Inheritance 1.  Single inheritance 2.  Multiple inheritance 3.  Hierarchical inheritance 4.  Multilevel inheritance

Draw an Entity-Relationship model for the relational schema given in the Appendix. Show all the entities, relationships, relationship names, and attributes and also underline the

System level permissions : With the use of data dictionary you can view them.       Let us take the table name as user_sys_privs (used in oracle).       DESCRIBE USER_SYS_PRI