我在 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)
我有这个例外:
#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
我试图运行内部查询并且它有效。我认为问题出在NOT IN
操作员上,但我不知道它在哪里。帮助将不胜感激!