What is a join?Explain the different types of joins?
Answer Posted / sandeep verma
Join match/combine two or more tables from a database. It means, combining rows or fields of two or more tables matching the common values. There are various types of joins which are as follows:
a) Self Join: joining table with it's own record to extract unique record (one employee is manager of other two employee)
b) Inner Join
i) Equi Join:No difference with inner join (just write join instead of inner join)
ii) Cross Join: will get you result each row of first table with each row of the other table(i.e. select * from employee cross join salary)
c) Outer Join
i) Left Outer Join:joins the matching records from two tables and all the records from left side of the table and those unmatched records have null value in right side of the table.
ii) Right Outer Join:joins the matching records from two tables and all the records from right side of the table and those unmatched records have null value in left side of the table.
iii) Full Outer Join: Regardless of matching record of both side of the tables, it produce all the records of both the table and produce NULL values for every column of the table that lacks of matching row.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How does join work in sql?
What is set serveroutput on?
What is data definition language?
How can we avoid duplicating records in a query?
What does pl sql stand for?
Why use triggers in sql?
What are the different type of joins in sql?
Which is better trigger or stored procedure?
What is procedure explain with example?
how would concatenate strings in mysql? : Sql dba
Does google use sql?
How do I run pl sql in sql developer?
What is type and rowtype in pl sql?
what is sub-query? : Transact sql
what is 'trigger' in sql? : Sql dba