-
NULL and NOT IN (Oracle)
Posted on March 26th, 2008 No commentsHere is a very interesting scenario.
I have an employee table called EMP.
And I have a DEPT table.
Now, I write a query to find out all the employees who are part of any department. (DEPT_ID is properly updated and found in DEPT table)
Now, I want to know if any employee is not part of any department.
What??? No results? I know that employee with EMP_ID 9 doesn’t belong to any department. Where did he go?
Is Oracle drunk? Is it giving me wrong results? Wait let me check with another query.


