当前位置:   article > 正文

MySQL 8.0-13.2.11.9 Lateral Derived Tables(横向派生表)_mysql join lateral

mysql join lateral

A derived table cannot normally refer to (depend on) columns of preceding tables in the same FROM clause. As of MySQL 8.0.14, a derived table may be defined as a lateral derived table to specify that such references are permitted.

派生表通常不能在同一个FROM子句中引用(依赖于)前面表的列。在MySQL 8.0.14中,派生表可以被定义为侧向派生表,以指定这种引用是允许的。

Nonlateral derived tables are specified using the syntax discussed in Section 13.2.11.8, “Derived Tables”. The syntax for a lateral derived table is the same as for a nonlateral derived table except that the keyword LATERAL is specified before the derived table specification. The LATERAL keyword must precede each table to be used as a lateral derived table.

非横向派生表使用13.2.11.8节“派生表”中讨论的语法来指定。侧面派生表的语法与非侧面派生表的语法相同,只是关键字lateral在派生表规范之前指定。横向关键字必须位于每个表之前,才能用作横向派生表。

Lateral derived tables are subject to these restrictions:

横向派生表受以下限制:

  • A lateral derived table can occur only in a FROM clause, either in a list of tables separated with commas or in a join specification (JOININNER JOINCROSS JOINLEFT [OUTER] JOIN, or RIGHT [OUTER] JOIN).

  • 侧面派生表只能出现在FROM子句中,或者出现在用逗号分隔的表列表中,或者出现在连接规范中(join、INNER join、CROSS join、LEFT [OUTER] join或RIGHT [OUTER] join)。

  • If a lateral derived table is in the right operand of a join clause and contains a reference to the left operand, the join operation must be an INNER JOINCROSS JOIN, or LEFT [OUTER] JOIN. 如果侧向派生表位于连接子句的右操作数中,并且包含对左操作数的引用,则连接操作必须是INNER join、CROSS join或left [OUTER] join。

    If the table is in the left operand an

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/喵喵爱编程/article/detail/761814
推荐阅读
相关标签
  

闽ICP备14008679号