Home
SQL Server / T-SQL
Aggregate Functions
Analytical Functions
Constraints
Cursor
Data Set
Data Type
Database
Date Timezone
Index
Insert Delete Update
Math Functions
Select Query
Sequence
Store Procedure Function
String Functions
Subquery
System
Table
Table Joins
Transact SQL
Transaction
Trigger
View
XML
Order « Select Query « SQL Server / T-SQL
SQL Server / T-SQL
Select Query
Order
1.
Use the ORDER BY clause
2.
Order by date
3.
Order the result set by ascending order
4.
Order in descending order
5.
Using Order By clause to order result
6.
Order string/char value descending
7.
Put the sort direction against each item in the ORDER BY clause
8.
Put the DESC in the first item in order by clause
9.
In an ascending order
10.
Distinct order
11.
ORDER BY is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is specified