Answer: Alias in Sql Server
plays an important roles,as it can be used for showing display names and also used to create a temporary name for columns or tables.
Sometimes we need to assign column name to some different names to display as a header then we give aliases to any columns.It is used with both table as well as column names.
Select col1 as alias1,col2 as alias2 from Table_name;
Suppose,we have a First name,Middle name and Last name in the table,and we want to show only Full name as column name,then we can assign alias.
Asked In: Many Interviews |