Is “Where IN” with multiple columns defined in Standard SQL?

前端 未结 4 1571
名媛妹妹
名媛妹妹 2020-12-17 16:33

I\'m working on a query like this:

SELECT * FROM requests where (id,langid) IN (SELECT nid,langid FROM node)

My questions are

  • does this
  • 4条回答
    •  庸人自扰
      2020-12-17 17:23

      Your SQL code is valid as regards the SQL-92 Standard. You can confirm this for yourself using the Mimer SQL-92 online validator (SQL-99 and SQL:2003 flavours also available). However, because it is a feature of Full SQL-92, it is not as widely implemented as perhaps it should be.

      Relationally speaking, the operator in question is a semi-join, for which none of the SQL Standards (and none of the vendors' extensions?) has an explicit syntax.

    提交回复
    热议问题