Reputation: 133
I don't have an example for this but I was just wondering if something like this is valid in any situation:
SELECT somefield
FROM sometable
WHERE something1 IN (SELECT somefield2 FROM sometable2)
AND something2 IN (SELECT somefield3 FROM sometable3)
Upvotes: 1
Views: 140
Reputation: 424973
Yes. Your syntax needs to be fixed though:
SELECT somefield
FROM sometable
WHERE something1 IN (SELECT somefield2 FROM sometable2)
AND something2 IN (SELECT somefield3 FROM sometable3)
Upvotes: 0
Reputation: 310993
In a word - yes. You can have as many conditions as you want in a where
clause, regardless of whether they have in
conditions or not.
Upvotes: 1