What are inner join and outer join?




Answers were Sorted based on User's Feedback



What are inner join and outer join?..

Answer / akn

Inner join is the most common type of join. Inner joins
return all rows from multiple tables where the join
condition is met.

Outer join returns all rows from one table and only those
rows from a secondary table where the joined fields are
equal (join condition is met).

Is This Answer Correct ?    16 Yes 3 No

What are inner join and outer join?..

Answer / pandian raman

Inner Join (simple join)

Inner joins return all rows from multiple tables where the
join condition is met.

For example,
SELECT suppliers.supplier_id, suppliers.supplier_name,
orders.order_date FROM suppliers, orders
WHERE suppliers.supplier_id = orders.supplier_id;

This SQL statement would return all rows from the suppliers
and orders tables where there is a matching supplier_id
value in both the suppliers and orders tables.
Outer Join

This type of join returns all rows from one table and only
those rows from a secondary table where the joined fields
are equal (join condition is met).

For example,

select suppliers.supplier_id, suppliers.supplier_name,
orders.order_date from suppliers, orders where
suppliers.supplier_id = orders.supplier_id(+);

This SQL statement would return all rows from the suppliers
table and only those rows from the orders table where the
joined fields are equal.

The (+) after the orders.supplier_id field indicates that,
if a supplier_id value in the suppliers table does not exist
in the orders table, all fields in the orders table will
display as <null> in the result set.

The above SQL statement could also be written as follows:

select suppliers.supplier_id, suppliers.supplier_name,
orders.order_date from suppliers, orders where
orders.supplier_id(+) = suppliers.supplier_id

Is This Answer Correct ?    9 Yes 1 No

What are inner join and outer join?..

Answer / omprakash.jsm

Inner join return rows from many tables where the join field and data type are equal.

outer join return rows from many tables where the join field are not equal but data type will be same.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer



More Oracle General Interview Questions

why should i declare foreign key constraint as self relation instead of binary relation in tables ?

0 Answers   Oracle,


What are the values that can be specified for OPTIMIZER MODE Parameter ?

1 Answers  


what is candidate key & super key

1 Answers  


Create table Employee ( Employee_Id varchar2(8) Constraint emp_id_pk primary key, FirstName varchar2(50), LastName varchar2(50), DeptID Number(5) Constraint dept_id_fk Foreign Key(DeptId) References Department(DeptId) ) Error I am getting: Constraint specification are not allowed here

2 Answers  


how to unbreak sequence numbers during intereptions

1 Answers   Ion Exchange,






which is best institue to learn oracle 11i in ameerpet or maithrivanam or sr nagar please help

5 Answers  


DBMS vs. RDBMS

2 Answers   TCS,


What is format trigger?

0 Answers  


What is an Index ? How it is implemented in Oracle Database ?

4 Answers  


Explain the statement?? ALTER TABLE TABLE_NAME MOVE; What it the use of above statement??

1 Answers   BirlaSoft,


What is Hash Cluster ?

2 Answers  


What is integrity and what is constraint??Explain with example

0 Answers   Google,






Categories