How To Define and Use Table Alias Names in Oracle?
Submitted by: AdministratorWhen column names need to be prefixed with table names, you can define table alias name and use them to prefix column names as shown in the following select statement:
SQL> SELECT e.first_name, e.last_name, d.department_name
FROM employees e INNER JOIN departments d
ON e.department_id=d.department_id;
<pre>FIRST_NAME LAST_NAME DEPARTMENT_NAME
-------------------- -------------------- ---------------
Steven King Executive
Neena Kochhar Executive
Lex De Haan Executive
Alexander Hunold IT
Bruce Ernst IT
David Austin IT
Valli Pataballa IT</pre>
Submitted by: Administrator
SQL> SELECT e.first_name, e.last_name, d.department_name
FROM employees e INNER JOIN departments d
ON e.department_id=d.department_id;
<pre>FIRST_NAME LAST_NAME DEPARTMENT_NAME
-------------------- -------------------- ---------------
Steven King Executive
Neena Kochhar Executive
Lex De Haan Executive
Alexander Hunold IT
Bruce Ernst IT
David Austin IT
Valli Pataballa IT</pre>
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How To Write Date and Time Interval Literals in Oracle? |
☺ | What Is Input Buffer in SQL*Plus? |
☺ | How To Recover a Dropped Table in Oracle? |
☺ | How To Use Values from Other Tables in UPDATE Statements using Oracle? |
☺ | How To Invoke the Data Pump Import Utility? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |