What is Equi-Join?
When a JOIN is made on Exact match between two columns it is called equi-Join.
Eg.
SELECT A.*
FROM EMPLOYEES A, EMPLOYEE_SAL B
WHERE A.EMP_ID=B.EMP_ID
OR
SELECT A.*
FROM EMPLOYEES A
INNER JOIN EMPLOYEE_SAL B
ON A.EMP_ID=B.EMP_ID
Both the queries mentioned above can be considered as Equi-join.
What is NON-Equi Join.
If you use any other comparison operator other than = in JOIN condition, it is called NON-Equi JOIN
SELECT A.*
FROM EMPLOYEES A, EMPLOYEE_SAL B
WHERE A.EMP_ID <> B.EMP_ID
Monday, August 3, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment