赞
踩
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 (JOIN
, INNER JOIN
, CROSS JOIN
, LEFT [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 JOIN
, CROSS JOIN
, or LEFT [OUTER] JOIN
. 如果侧向派生表位于连接子句的右操作数中,并且包含对左操作数的引用,则连接操作必须是INNER join、CROSS join或left [OUTER] join。
If the table is in the left operand an
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。