Using aliases in Select

How to use an aliase name in the SELECT clause in Oracle

However, instead of ename and job the column headings should be empname and jobrole. The query that will solve our purpose will be:

SELECT ENAME  EMPNAME, JOB JOBROLE FROM EMP;

The fun comes, if you want a space in between. Like if you want JOBROLE should be displayed as JOB ROLE, then the query will become like

SELECT ENAME Empname, JOB “Job Role” FROM EMP;

Notice the usage of quodes.

Leave a Reply