Question:
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. Source: CoolInterview.com
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. Source: CoolInterview.com
Answered by: hari | Date: 2/23/2009
| Contact hari
this is correct answer
DESC: This Command displays column names and data types for a given table. Syntax : DESC[RIBE] <table-name> Source: CoolInterview.com
Answered by: Murali | Date: 11/11/2009
| Contact Murali
yes this command is used to display table contents(column names and data types). syntax:DESC<table-name> Source: CoolInterview.com
Answered by: ruby | Date: 1/5/2010
| Contact ruby
the DESC option display the required columm in the descendig order. select emp_id,ename from employee desc ename; this will give the emp_id with the corresponding name in the descing order.ie starting from z to a Source: CoolInterview.com
Answered by: manu narang | Date: 3/24/2010
| Contact manu narang
desc <table-name> This command will display struture of given tablename. Source: CoolInterview.com
Answered by: Subroto Rao | Date: 4/17/2010
| Contact Subroto Rao
DESC is a keyword used with order by clause to sort & display the particular column defined in the query in the descending order Source: CoolInterview.com
Answered by: KASHMIRA | Date: 4/19/2010
| Contact KASHMIRA
DESC is used to display the contents of table.i.e.,column names and datatypes of a table. SYNTAX: DESC <column name> Source: CoolInterview.com
Answered by: puchal | Date: 8/30/2010
| Contact puchal
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|