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

Why you are not able to create a table using select command,if it is having a LONG column? for eg:create table test as select * from test1 here test1 containg a column having LONG datatype...

1 Answers  


What are the advantages of sql? Explain

0 Answers  


How we get all_group_function's(Sum,avg,count,max and min_value of a column(Sal) Using pl/sql anonymous block, with out using group function's. You shouldn't use more than one select statement in entire the program. Like cursor c is select * from <table_name>; except this you can't use another select statement. You can use no of variables as per requirement.

1 Answers  


Can triggers stop a dml statement from executing on a table?

0 Answers  


Does a primary key have to be a number?

0 Answers  






What is the difference between cross join and natural join?

0 Answers  


how do you know if your mysql server is alive? : Sql dba

0 Answers  


what is Difference between Having and Where clause?

5 Answers   IBM,


Can I call a procedure inside a function?

0 Answers  


Explain the uses of a database trigger?

0 Answers  


discuss about myisam key cache. : Sql dba

0 Answers  


What is %s in sql?

0 Answers  


Categories