A column alias name is an alternative name given to the column in a select statement.It is used to rename a column heading in select statement and it allows the user to understand the output easily.
Syntax:
Select column_name AS "Alias Name" from table_name ;
The keyword AS used between the column name and alias name is optional.we can give the blank space instead of AS keyword.Requires double quotation marks if it contains spaces or special characters or if it is case sensitive.
Example :
SELECT last_name as name ,commission_pct as comm FROM employees;
SELECT last_name as name ,salary*12 "Annual Salary" as comm FROM employees;
Default column heading :
I am interested in hearing your feedback, so that I can improve my articles and learning resources for you.connect with us on facebook, twitter
Syntax:
Select column_name AS "Alias Name" from table_name ;
The keyword AS used between the column name and alias name is optional.we can give the blank space instead of AS keyword.Requires double quotation marks if it contains spaces or special characters or if it is case sensitive.
Example :
SELECT last_name as name ,commission_pct as comm FROM employees;
SELECT last_name as name ,salary*12 "Annual Salary" as comm FROM employees;
Default column heading :
- Character and date column headings are left aligned.
- Number column heading are right align .
- Default heading display in UPPERCASE .
I am interested in hearing your feedback, so that I can improve my articles and learning resources for you.connect with us on facebook, twitter