We can create Aliases in 2 ways:-
As the name implies, Column Aliases are created at column level,used so show column headings.
As the name suggests, Table Aliases are created at Table level,used to shorten the long table names.Basically Table aliases are used for Self Join where we can differentiate same table name with different aliases.
Select First_Name as Name,Designation as Role From Employee_Master Emp;
Here,Name and Role are treated as Column Aliases and Emp will be treated as Table Alias.
Asked In: Many Interviews |