Types of joins ?

Answers were Sorted based on User's Feedback



Types of joins ?..

Answer / rekha d rathnam

1.Cross Join - is a join without a join contition
SELECT * FROM table-1 CROSS JOIN table-2

2.Inner Join - return only matched records
i.Equi-Join
ii.Non-Equi Join
* Inner joins or equi joins are the most common type of
joins, they use equality "=" of common attributes to join
tables.
SELECT projects.name AS "Project Name", teachers.name
FROM teachers, projects
WHERE teachers.id = projects.teacher;

* Like an inner join, but with an operator different
from "=" in the condition, e.g., not equal "<>".
SELECT projects.name AS "Project Name", teachers.name
FROM teachers, projects
WHERE teachers.id != projects.teacher;

3.Outer Join
i.Full Outer Join
11.Left Outer Join
iii.Right Outer Join
LEFT -- only unmatched rows from the left side table (table-
1) are retained
RIGHT -- only unmatched rows from the right side table
(table-2) are retained
FULL -- unmatched rows from both tables (table-1 and table-
2) are retained
SELECT assign.project, projects.name, assign.percentage
FROM projects LEFT OUTER JOIN assign
ON projects.id = assign.project ;

4.Self Join - With table aliases you can join a table to
itself.
SELECT DISTINCT *
FROM assign a, assign b
WHERE a.stud = 2 AND b.stud = 4 AND a.project = b.project;

5.Multi Join - The number of tables involved in a join are
not restricted.
SELECT DISTINCT assign.project, projects.name AS "Project",
assign.percentage, stud.name AS "Student"
FROM projects, assign, stud
WHERE projects.id = 1 AND projects.id = assign.project
AND assign.stud = stud.id ;

Is This Answer Correct ?    13 Yes 0 No

Types of joins ?..

Answer / reddy

Hi Friends,

1)Inner or Natural Join.
2)Non equi Join.
3)Self Join.
and 4)Outer Join.

Thanks
Reddy

Is This Answer Correct ?    9 Yes 3 No

Types of joins ?..

Answer / guest

1.Simple/Inner/Natural Join
2.Equi(contains only = sign) /Non-Equi Joins(other simbles)
3.Outer Joins(Left Outer Join/Right Outer Join)
4.Cross Join
5.Self Join

Is This Answer Correct ?    9 Yes 3 No

Types of joins ?..

Answer / ganesh

hai
1.Equi Join
2.Non-Equi Join
3.Cartesian Join
4.outer Join(+)(Left Outer Join/Right Outer Join)
5.Self Join

Is This Answer Correct ?    5 Yes 2 No

Types of joins ?..

Answer / lakshminrayana reddy

5 types
1) Equi join
2) cartesian join
3) non-equi join
4)outer join(+)
i)left outer join
ii) right outer join
5)self join

Is This Answer Correct ?    5 Yes 2 No

Types of joins ?..

Answer / a.jyothsna

1) SELF JOIN
2) EQUI JOIN(OR) INNER JOIN
2.1) NON-EQUI JOIN
3)OUTER JOIN
3.1) LEFT OUTER JOIN
3.2) RIGHT OUTER JOIN
3.3) FULL OUTER JOIN

Is This Answer Correct ?    3 Yes 1 No

Types of joins ?..

Answer / siva

1.Self Join
2.Inner Join
i.Equi-Join
ii.Non-Equi Join
3.Outer Join
i.Full Outer Join
11.Left Outer Join
iii.Right Outer Join

Is This Answer Correct ?    4 Yes 2 No

Types of joins ?..

Answer / anuadarsh

1)Inner Join
a)Equi join
b)Natural Join
c)Cross Join
2)Outer Join
a)Left join
b)Right join
c)Full join
3)Self Join

Is This Answer Correct ?    3 Yes 2 No

Types of joins ?..

Answer / chandu

5 Types [7.x]

Equi Join
Cartesian Join
Non Equi Join
Outer Join
Self Join

8 Types [9i]

Natural Join
Join with Using
Join with on
Inner Join
Left Outer Join
Right Outer Join
Full Outer Join
Cross Join

Is This Answer Correct ?    0 Yes 0 No

Types of joins ?..

Answer / sam

)Inner Join
a)Equi join
b)Natural Join
c)Cross Join
2)Outer Join
a)Left join
b)Right join
c)Full join
3)Self Join

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

What is difference between table and view?

0 Answers  


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

0 Answers   MCN Solutions,


Why is pl sql used?

0 Answers  


What is normalisation and its types?

0 Answers  


What will be the output for the below Query Select 'High' from dual where null = null;

12 Answers   Infosys, Satyam,






Why truncate is faster than delete?

0 Answers  


How many types of privileges are available in sql?

0 Answers  


what is a record in a database ? : Sql dba

0 Answers  


How is pl sql different from sql?

0 Answers  


What is a stored procedure ?

5 Answers  


Which one is the Best approach to put code, among Triggers and Procedures? Explain?

1 Answers   Sierra Atlantica,


How to remove duplicate rows from a table?.

3 Answers  


Categories