Types of joins ?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
What are the different types of sql commands?
What is dml and ddl?
Explain two virtual tables available at the time of database trigger execution.
Which kind of parameters cannot have a default value in pl sql?
What is a unique key and primary key and foreign key?
How can I pass the inner procedure value to outer procedure ?
how to create a new table in mysql? : Sql dba
How to use distinct and count in sql query? Explain
Can we call stored procedure in function?
sales persons should always receive commission of 100 at least. employees who r not sales persons should never receive commission.(Triggers)
why we go for package? what are the advantages of using instead of seperate procuderes or functions
what is cursor procedure
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)