Which clause is used to sort the records of a table?
Answers
Answered by
4
Answer:
The Order by clause by default sorts the retrieved data in ascending order. To sort the data in descending order DESC keyword is used with Order by clause.
Answered by
2
Answer:
‘ORDER BY’ clause is used to ‘sort the records’ of a table.
Explanation:
The ‘ORDER BY’ clause has been used for sorting the result records in ascending order or descending order. In default, the ‘order by sorts’ the record in ascending orders. Or else we can use ASC keyword. In order to ‘sort the records’ in ‘descending order’, DESC keyword is used in ‘ORDER BY’ clause. The syntax is provided below as follows,
SELECT col 1, col 2,, …
FROM table name
ORDER BY col 1, col 2, …. ASC / DESC;
Similar questions
English,
5 months ago
Social Sciences,
5 months ago
Computer Science,
11 months ago
English,
11 months ago
Math,
1 year ago