Inner Join and Outer Join in SQL

Inner Join

Inner Join in Sql will returns common elements in both tables as output.If A and B are Two table it will returns values that are present in both A and B tables.

what is inner join
Inner Join

Outer Join

Outer join is of three types:

  • Left Outer Join
  • Right Outer Join
  • Full Outer Join

Left outer join will return all values that are present in Table A and the values respective to row that are present in both tables. If table A row values are not present in table b then it returns null value for that.

What is left outer join
LeftOuter Join

Right outer join will returns all values that are present in table B but also common values that are present in both Table A and B .Values of table B tha are not present in table A returns null values for that as output.

What is Right outer join
Right Outer Join

Full outer Join will return the all the values of table A & B.

what is full outer join
Full Outer Join

 

By SC

2 thoughts on “Inner Join and Outer Join in SQL”

Leave a Reply

Your email address will not be published. Required fields are marked *