RSS Feed

SQL Equi-join

The join condition determines whether the join is an equi-join or a non equi-join. when we relate two tables on a join condition by equating the columns from the tables, it is an equi-join. when we relate two tables on a join condition by an operator other than equality it is an non-equi-join. A query may contain equi-joins as well as non-equi-joins.


Examples of Equi-join:


SELECT emp.deptno, bonus.comm
FROM emp bonus
WHERE emp.ename = bonus.ename


SELECT * FROM emp
INNER JOIN dept
ON emp.DeptID = dept.DeptID

No comments:

Post a Comment