Scenario:

You are working as SQL Server developer, you need to extract the data from dbo.Customer table and provide in an Excel Sheet. Your table has difference columns such as FName, LName but you want the output to come with FirstName and LastName. How would you do that?

Solution:

Alias is a great way to make your column names more readable. As in our question above, we want to display FName as FirstName and LName as LastName, Alias is the way to go. Let's create dbo.Customer table with columns and then use select query with alias to display Columns as we like.