Introduction

Completed

When you retrieve data from a database, you will often want to sort the data into a particular order, or filter it to include only the rows that meet specific criteria.

The Transact-SQL SELECT statement supports sorting query results by applying the ORDER BY clause, and filtering results using the WHERE clause.

In this module, you will learn how to:

  • Sort the results of a query by using the ORDER BY clause
  • Limit the sorted results to show only the top n rows
  • Return paged results
  • Remove duplicates from results
  • Filter data with predicates in the WHERE clause