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


Please Help Members By Posting Answers For Below Questions

What is sql mysql pl sql oracle?

559


Can a select statement fire a trigger?

646


how to fetch alternate records from a table? : Sql dba

584


What is blind sql injection?

563


What are the different sql languages?

530






what is normalization? : Sql dba

557


Can a primary key be a foreign key?

568


What are the different ddl commands in sql?

572


Is sql a oracle?

517


What is sqlca in powerbuilder?

554


Can we write dml inside a function in sql server?

489


What is exception? What are the types of exceptions?

544


what is not null constraint? : Sql dba

538


What does pl sql stand for?

649


What is t sql used for?

544