Computer Science, asked by manishshastri3413, 11 months ago

Which clause is used to sort the records of a table?

Answers

Answered by latha567
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 mindfulmaisel
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