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 ?    17 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 2 No

Post New Answer

More Oracle General Interview Questions

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 convert numbers to characters in oracle?

0 Answers  


How to do paging with oracle?

0 Answers  


How to bring a tablespace offline?

0 Answers  


Difference between an implicit & an explicit cursor.?

2 Answers  






How to turn on or off recycle bin for the instance?

0 Answers  


A USER HAVING CREATE SESSION PREVILAGE CAN ALTER PASSWORD/CHANGE PASSWORD?

2 Answers  


What is a trace file and how is it created in oracle?

0 Answers  


write a query to dispaly those name who is more than one in student table? example- in a student table sandeep kumar comes 4 times, rakesh kumar comes 2 times, ajit kumar comes 1 times so query will display sandeep kumar and rakesh kumar single times.

11 Answers   Wipro,


There is a big table with "n" of rows and 40 + columns .It doesn't have primary key.How do you select the primary key. In other words how do you get the duplicate records.

2 Answers   Microsoft,


What is the oracle implicit cursor?

0 Answers  


What are the various types of snapshots ?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)