Explain ORDER BY statement in SQL Server.
Ex :
Select EmployeeName, EmployeeID from Employees order by EmployeeName Desc
This Query will display the Employee names in reverse alphabetical order.
Select EmployeeName, EmployeeID from Employees order by EmployeeName Desc, EmployeeID Asc
This Query will display the Employee names in reverse alphabetical order and the Employee ID in alphabetical order.
Labels: ORDER BY statement in SQL Server