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 is the difference between post-database commit and post-form commit?
What are the logical operations?
How to write a left outer join with the where clause in oracle?
Can we store images in oracle database?
What are the different types of trigger and explain its various uses and functions?
How to get maxsal , minsal, ename department wise in single query
how the indexes are stored in the Oracle Database?
How to define a data field as not null?
What is index-organized table in Oracle?
State any two functions of oracle?
What is data block in Oracle?
What is a cursor variable?
Describe an oracle table?
What is an oracle cursor variable?
What is flashback in Oracle?