What is a join ? Explain the different types of joins ?

Join is a query which retrieves related columns or rows from multiple tables.Self Join - Joining the table with itself.Equi Join - Joining two tables by equating two common columns.Non-Equi Join - Joining two tables by equating two common columns.Outer Join - Joining two tables in such a way that query can also retrieve rows that do not have corresponding join value in the other table.

Showing Answers 1 - 22 of 22 Answers

Arun

  • May 9th, 2005
 

hi guys, 
i want the difference between inner and outer joins can u please post it to me  
thanks  
arun

  Was this answer useful?  Yes

sujatha

  • Mar 7th, 2007
 

Hi,
Diff b/t inner join & outer join?
        Inner join is a join which will select only the matching records from both tables. It will avoid all the non-matching records from both tables.
Outer join is join which selects matching records as well as non-matching records.
          

  Was this answer useful?  Yes

rahul nittala

  • Jul 1st, 2007
 

As posted in earlier answer joins are used to fetch columns from more than one table by using a column which is present in both the tables.

Joins are of two types:

1. Inner Join  - Matching column is given based on which joining the two tables occurs. all the rows which have a matching value of the column selected will be extracted. This is just like Intersection in sets. First find out all the matching values for the column selected for inner join, then return all the rows for this matching values.

2. Outer Join - Outer join is again divided into 3 types:

i Left Outer Join
ii Right Outer Join
iii Full Outer Join

In Left Outer join, unmatched column values for the first table are also extracted.

In right outer join, unmatched column values for the second table and matched column values for both the tables are extracted.

In full join, all the columns irrespective of matches are extracted.

  Was this answer useful?  Yes

sribharath

  • Sep 18th, 2007
 

I have a doubt now after reading the below line

"In full join, all the columns irrespective of matches are extracted."
Then what is the difference between, Full outer join and a cartetian Product?

hiranmayee

  • Sep 9th, 2008
 

In Full Outer Join we get both matched and unmatched data from both the tables
whereas Cartesian join is a join in which each row of one table is cross multiplied with each row of the second table

  Was this answer useful?  Yes

swapna

  • Mar 16th, 2012
 

Inner joins returns all rows from both tables where there is a match whereas outer join is used in the situations where it is desired to select all rows from the table on the left.

  Was this answer useful?  Yes

sukanya

  • Jun 28th, 2015
 

Can any one tell me what is self join? What is difference between GROUP BY and HAVING?

  Was this answer useful?  Yes

GOPAL

  • Jul 28th, 2015
 

Joins are used to join the columns of different tables.
Types of Joins: 1. Inner Joins, 2. Outer Joins

Inner Joins are sub divided into two types
1. Self Join, 2. Equvi Join

Self Join is used to join different columns belongs to same table but similar data.

Equvi Join is used to join different tables .one column records must match with another Table column.

Outer Joins
Left, Right, Full Outer Joins

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions