+3 votes
in Class 12 by kratos

Write the purpose of ORDER BY clause using suitable example.

1 Answer

+1 vote
by kratos
 
Best answer

In SQL ORDER BY command is used to sort the results of the query.

Syntax: ORDER BY column name sorting mechanism;

For Example: SELECT Salary FROM Employee ORDER BY Salary DESC;

The above statement will display the Salary of Employees in descending order from table Employee.

...