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

Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.

2304


How to import one table back from a dump file?

1024


How do I use unicode codesets with the weblogic jdriver for oracle driver?

1070


What is the order of defining local variables and sub procedures/functions?

1054


How to synchronize 2 schema's objects?

2165


How to use in conditions in oracle?

1046


Hi Can any one tell me what are the API's used in requisition import.

1917


How to see the table columns used in an index?

1016


Explain about integrity constraint?

1117


How to speed up webrick?

1070


21. Using a set operator, display the client number of all clients who have ever placed an order and whose whose name does not contain the string Sm.

2091


What is clustered table in Oracle?

1182


How to end the current transaction in oracle?

1020


What is memory advisor in Oracle?

1073


What is the usage of synonyms?

1134