ORDER BY Multiple Columns MSSQL Server Tutorial

Use of ORDER BY Multiple Columns In MSSQL Database Server Tutorial Example

Run microsoft sql server management studio query editor or any client tools you like then copy & paste the below code to use order by multiple column alias by sql command or statement in MSSQL Database Server Tutorial Example

   -- Northwind
   SELECT  LastName, Country, HireDate AS Joinning
   FROM  Employees
   WHERE  Region IS NOT NULL
   ORDER BY Joinning DESC, LastName ASC

   -- "DESC" descending sort order
   -- "ASC" ascending order & it is default
   Make sure that you have "Northwind" sample database available.
   -- is comment in MSSQL
   -- in fact it is comment in Oracle and MySQL as well

Use of ORDER BY Multiple Columns In MSSQL Database Server Tutorial Example - Result in Microsoft Sql Server Management Studio Query Editor Client Tools