By admin | January 25, 2008

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.

Digg Facebook Technorati Bloglines

Email This Post Email This Post
Topics: Database |



Leave a Comment

Name:

E-Mail :

Website :

Comments :

Ad

Calendar

November 2008
M T W T F S S
« Oct «-»  
 12
3456789
10111213141516
17181920212223
24252627282930

Search

Polls

  • Who will rule the world?

    View Results

    Loading ... Loading ...