I have this query in SQL
SELECT E.ID E.name
into #TmpEmplyee
FROM Employee E, Outsourcing O, Student S
WHERE E.ID NOT IN (SELECT ID FROM Student UNION SELECT ID FROM Outsourcing)
And I have this exception:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.name FROM Employee E, Outsourcing O, Student S WHERE E.ID NOT IN (SELECT ID FRO' at line 1
I have tried to run the inner query and it works. I think that the problem is with NOT IN operator but I don’t know where it is. Help would be much appreciated!
you need a comma 🙂