1.

Write the purpose of ORDER BY clause using suitable example.

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.



Discussion

No Comment Found

Related InterviewSolutions