Types of Joins that are used in SQL?

Asked By 0 points N/A Posted on -
qa-featured

Please list the types of Joins that are used in SQL, Oracle and MYSQL and their advantages and uses. I would also like to know in detail about a scenario in which Right and Left joins are used in the same query.

Is it possible?

SHARE
Answered By 0 points N/A #151751

Types of Joins that are used in SQL?

qa-featured

 

There are three types of joins in SQL, ORACLE and MYSQL:
 
1. Inner Join
  • In Inner Join two tables are joined together only if they have at least one common column
2. Outer Join
  • In Outer Join two tables are joined together irrespective of the fact whether they have common column or not Outer join is classified in three categories:
  • Left Outer Join
  • The Left Outer Join returns all rows from the left table in query, even if there are no matches in the right table
  • Right Outer Join
  • The Right Outer Join all the rows from the right table in the query , even if there are no matches in the left table
  • Full Outer Join
  • The Full Outer Join return rows when there is a match in one of the tables
3. Self Join
  • In self join a table is joined to itself
 

Login/Register to Answer

Related Questions