What are inner join and outer join?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
10. Display the client number, order date and shipping date for all orders where the shipping date is between three and six months after the order date.
Can we store pictures in the database and if so, how it can be done?
Which dictionary tables and/or views would you look at to diagnose a locking issue?
How to define a data source name (dsn) in odbc manager?
How to display employee records who gets more salary than the average salary in the department?
what is difference between table and view? where to use views? thanks in advance!
Difference between NO DATA FOUND and %NOTFOUND?
What will be the syntax to find current date and time in format "yyyy-mm-dd"?
How to open and close an explicit cursor in oracle?
What are the different editions of oracle?
How to lock and unlock a user account in oracle?
what is main def between plsql/table and array?