Series: Subject: Topic:
Question: 193 of 216

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.

Asked by: Interview Candidate | Asked on: Mar 6th, 2005
Showing Answers 1 - 5 of 5 Answers

Answered On : Oct 13th, 2005

Ans:             example of the 1ST purpose is            DESC employee;

Login to rate this answer.
Jayakumar M

Answered On : Nov 8th, 2005

DESCRIBE - shortly DESCandDESC - 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.

Login to rate this answer.

Answered On : 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

Yes  1 User has rated as useful.
Login to rate this answer.

Answered On : Sep 11th, 2007

View all answers by rekhask

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

Yes  1 User has rated as useful.
Login to rate this answer.

Answered On : Jul 9th, 2010

View all answers by anuraganu100

DESC is used with ORDER BY clause i.e.SELECT * FROM usermaster ORDER BY userid DESC

Login to rate this answer.

Give your answer:

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

Related Open Questions



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.