Hi,
The EXIST predicate is always followed by a subselect.
For example the get the rows for values in department which have deptno which matches a workdept in the employee table you'd do:
SELECT deptno, deptname FROM department WHERE EXISTS (SELECT workdept FROM employee WHERE workdept = dept)
This can also be done by just using a join.
SELECT department.deptno, department.deptname FROM department, employee WHERE department.deptno = employee.workdept;
What's the pro's and con's of both approaches?
Thanks