What is the use of DESC in SQL?

Answer :

DESC has two purposes. It is used to describe a schema as well as to retrieve rows from table in descending order.

Explanation :

The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order.

Showing Answers 1 - 5 of 5 Answers

Anuradha

  • Oct 13th, 2005
 

Ans:

             example of the 1ST purpose is

           DESC employee;

  Was this answer useful?  Yes

Jayakumar M

  • Nov 8th, 2005
 

DESCRIBE - shortly DESC

and

DESC - What we are using in ORDER BY CLAUSE are not same.

DESCRIBE (DESC) is SQL*PLUS Command used to display the structure of the tables and views.

DESC - What we are using in ORDER BY CLAUSE is a ORDER BY CLAUSE Option Value. Its Associated with SQL COMMAND.It is used to sort the rows in DECENDING order.

  Was this answer useful?  Yes

shweta

  • Aug 22nd, 2007
 

There are two way sorting in SQL, Asending and Decending order, Asending is by default, but decending needs to be specified in SQL

rekhask

  • Sep 11th, 2007
 

DESC[RIBE] is a SQL*Plus command

It is used to describe an Oracle Table, View, Synonym, package or Function.

Note that because this is a SQL*Plus command you don't need to terminate it with a semicolon.

Syntax:

   DESC table     DESC view     DESC synonym     DESC function     DESC package

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions