Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are inner join and outer join?

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


Please Help Members By Posting Answers For Below Questions

what is Single Byte Overhead...?

2555


What is the difference between substr & instr functions?

1225


Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).

2323


Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?

1087


Please explain oracle data types with examples?

1068


An automatic job running via DBMS_JOB has failedKnowing only that its failed, how do you approach troubleshooting this issue?

2051


What are the oracle differences between nvl and coalesce

1147


What are the oracle built-in data types?

1062


How to specify default values in insert statement using oracle?

1104


What is SQL access advisor in Oracle?

1187


What is rich query?

979


What is archive log in Oracle?

1134


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?

2827


What is the exact use of Collections?

2143


How are extents allocated to a segment?

1125