This content was proof-read by Grammarly. You can Try Grammary for FREE
When returning the query results , you want to provide an alternate name for the column for readability purpose , you can use the AS clause to specify the column alias in SQL Query.
How to specify Column alias in SQL Query ?
Below is an example of the usage of the column alias in SQL Query.
USE AdventureWorks2014 SELECT Name as 'Depart Name',GroupName as 'Group Name' FROM HumanResources.Department
Every column in the Query result has a column name associated to it and is displayed in the column header. In the above query , the column name is Name and GroupName. An alias name ‘Depart Name’ and ‘Group Name’ is specified for the same in quotes which lets the developer specify the alias name containing spaces.
Subscribe to our weekly newsletter below and never miss the latest product or an exclusive offer.