In SQL SERVER Order By Clause is used to sort the result set in ascending or descending order. Order By Clause can only be used in SELECT Statement.
The Syntax of Order By Clause is:
SELECT Column_Name,Column_Name… FROM TABLE_NAME [WHERE CONDITION] [ORDER BY CLAUSE] [ASC|DESC]
If we does not specify ASC or DESC then SQL Server By Default Sort result set in Asc
Limitations and Restrictions There is no limit to the number of columns in the ORDER BY clause, however, the total size of the columns specified in an ORDER BY clause cannot exceed 8,060 bytes. Columns of type text, image, ntext, geography, geometry, and xml cannot be used in an ORDER BY clause.
If a table name is aliased in the FROM clause, only the alias name can be used to qualify its columns in the ORDER BY clause.
Column names must be unique Null values are treated as the lowest possible values
Topic:
sql server order by clause
sql server sorting
sql server asc desc
SQL ORDER BY Keyword
sql server ORDER BY Clause
sql server data sorting
Specifying a conditional order By Clause
SQL SERVER Limit the no of rows: • Chapter 7 - SQL SERVER Limiting the number...
SQL Question Answer for freshers: https://www.youtube.com/watch?v=QLCNy...
jQuery for Beginners: • jQuery Complete Course For Beginners | jQu...
• Chapter 5 - What is SQL AND, OR and NOT Op...