SELECT *
FROM employees e
WHERE NOT EXISTS
(
SELECT name
FROM eotm_dyn d
WHERE d.employeeID = e.id
)
Assuming the column values involved can not be NULL -
LEFT JOIN/IS NULL
is more efficient than NOT EXISTS
- read this article for details.
They are equivalent.
NOT EXISTS
is more efficient than LEFT JOIN/IS NULL
- read this article for details.
Like Oracle, they are equivalent.
If you have trouble with the detail that the column values can not be null, yet use the LEFT JOIN / IS NULL - remember what a LEFT JOIN signifies. This link might help.