Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我没有这个例子,但我只是想知道这样的事情在任何情况下是否有效:
SELECT somefield FROM sometable WHERE something1 IN (SELECT somefield2 FROM sometable2) AND something2 IN (SELECT somefield3 FROM sometable3)
一句话——是的。您可以在一个where子句中包含任意数量的条件,无论它们是否具有in条件。
where
in
是的。您的语法需要修复: