I\'m working on a query like this:
SELECT * FROM requests where (id,langid) IN (SELECT nid,langid FROM node)
My questions are
I checked that with PostgreSQL and it works (it is officially supported), but it's your responsibility to make id ↔ nid and langid ↔ langid column types compatible (or use explicit casting).
I think it is pretty standard construct. I have SQL:2003 draft and there is in predicate defined (as well as mentioned exists predicate).
8.4
Function
Specify a quantified comparison.
Format
::=
::= [ NOT ] IN
::=
| ... (rest is not important here)
EDIT:
As checked works well under MySQL too (version 5.0.90-log). Here is documentation link.
- 热议问题