Locked lesson.
About this lesson
Aliases can be used to temporary rename columns and tables
Exercise files
Download this lesson’s related exercise files.
Aliases.docx59 KB Aliases - Solution.docx
59.1 KB
Quick reference
Aliases
Aliases let us temporarily rename columns.
When to use
Use them whenever you want to rename a column temporarily for any given set of results.
Instructions
SELECT [First Name] AS "Customer First Name"
FROM [dbo].[Current_Customers]
This will give an alias of 'Customer First Name' to the column 'First Name'. This might be useful to differentiate between another column you have chosen to display, 'Potential Customer First Name' for example.
Hints & tips
- Aliases are good for temporarily renaming columns
- They aren't really renamed, just labeled differently in your results
Lesson notes are only available for subscribers.