order by

External Article

Returning Sorted Record Sets Using the ORDER BY Clause

  • Article

Having your data returned to you in some meaningful sorted order is important sometimes. If you don’t tell SQL Server you want to order the results of a SELECT statement then there is no guarantee that your result set will come back in a particular order. To make sure a result set is ordered you need to use the ORDER BY clause. In this article I will be exploring how to return an order result set by using the ORDER BY clause.

2015-01-16

10,316 reads

Blogs

SQL Server Wait Stats

By

Everything in SQL Server is waiting for something…this is by design. And most people...

FabCon 2025 Recap

By

Hey fellow data friends! Wow, March was an absolutely crazy month (in the best...

Privacy Policy

By

We value your privacy. This policy explains what personal data we collect and why. What...

Read the latest Blogs

Forums

why cant i get rid of extra dataset

By stan

hi i never used shared datasets before in ssrs.   i created a dataset  called...

Distinct values using string_agg

By jagjitsingh

Hi Is it possible to get distinct values using string_agg Select T1."transType", WHEN T1."TransType"...

Refactoring a DELETE query using NOT EXISTS — need expert feedback

By abdalah.mehdoini

Hi everyone, I'm working on optimizing a DELETE query used in a data cleanup...

Visit the forum

Question of the Day

Importing Flat Files

What types of sources can be used with the Import Flat File Wizard in SQL Server Management Studio (SSMS)?

See possible answers