How To Write an Inner Join with the WHERE Clause in Oracle?
Submitted by: AdministratorIf you don't want to use the INNER JOIN ... ON clause to write an inner join, you can put the join condition in the WHERE clause as shown in the following query example:
SQL> SELECT d.department_name, e.first_name, e.last_name
2 FROM departments d, employees e
3 WHERE d.manager_id = e.employee_id;
<pre>DEPARTMENT_NAME FIRST_NAME LAST_NAME
-------------------- -------------------- --------------
Administration Jennifer Whalen
Marketing Michael Hartstein
Purchasing Den Raphaely
Human Resources Susan Mavris
Shipping Adam Fripp
IT Alexander Hunold
......</pre>
Submitted by: Administrator
SQL> SELECT d.department_name, e.first_name, e.last_name
2 FROM departments d, employees e
3 WHERE d.manager_id = e.employee_id;
<pre>DEPARTMENT_NAME FIRST_NAME LAST_NAME
-------------------- -------------------- --------------
Administration Jennifer Whalen
Marketing Michael Hartstein
Purchasing Den Raphaely
Human Resources Susan Mavris
Shipping Adam Fripp
IT Alexander Hunold
......</pre>
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | What Happens to Indexes If You Drop a Table? |
☺ | How To Add a New Column to an Existing Table in Oracle? |
☺ | How To Invoke the Data Pump Import Utility? |
☺ | How To Create Tables for ODBC Connection Testing? |
☺ | How To Retrieve Data from an Explicit Cursor? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |