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 Single Byte Overhead...?
What is the difference between substr & instr functions?
Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
Please explain oracle data types with examples?
An automatic job running via DBMS_JOB has failedKnowing only that its failed, how do you approach troubleshooting this issue?
What are the oracle differences between nvl and coalesce
What are the oracle built-in data types?
How to specify default values in insert statement using oracle?
What is SQL access advisor in Oracle?
What is rich query?
What is archive log in Oracle?
How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?
What is the exact use of Collections?
How are extents allocated to a segment?