Answer Posted / 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 |
Post New Answer View All Answers
What privilege is needed for a user to create indexes in oracle?
How to delete an existing row from a table in oracle?
What is oracle server autotrace in oracle?
How do I learn what codesets are available in oracle?
What is Segment Advisor in Oracle?
How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?
What is a trigger and what are its types?
What is a cursor variable?
What is bind variable in oracle 11g?
How to fetch the row which has the max value for a column?
What is a oracle database?
How to store pictures on to the database?
What are the differences between char and varchar2 in oracle?
What is a subquery?
What is the difference between sharding and partitioning?