Have you failed a job interview?
Send us your job interview questions and get correct answers.

What is ORDER BY statement used for in Microsoft SQL server?

Experience Level: Junior
Tags: DatabasesMS SQL ServerQuality Assurance (QA)


ORDER BY statement is used together with SELECT statement and defines by which columns the result-set is sorted.

The following query will sort the result-set by LastName and FirstName.

SELECT * FROM Customers ORDER BY LastName, FirstName

Related Databases job interview questions


No Comments Yet.
Be the first to tell us what you think.
MS SQL Server for Testers
MS SQL Server for Testers

Are you learning Databases ? Try our test we designed to help you progress faster.

Test yourself