| title | ORDER BY expression-list | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 01/19/2017 | ||
| ms.prod | sql | ||
| ms.prod_service | connectivity | ||
| ms.reviewer | |||
| ms.technology | connectivity | ||
| ms.topic | conceptual | ||
| helpviewer_keywords |
|
||
| ms.assetid | 5ef88186-a99f-4e2c-a3f3-98a42d4f03a5 | ||
| author | David-Engel | ||
| ms.author | v-daenge |
Expressions can be used in the ORDER BY clause. For example, in the following clauses the table is ordered by three key expressions: a+b, c+d, and e.
SELECT * FROM emp
ORDER BY a+b,c+d,e
No ordering is allowed on set functions or an expression that contains a set function.