PostgreSQL · Command
LATERAL
LATERAL lets a FROM subquery or table function use columns from an earlier FROM item. PostgreSQL evaluates it for each source row or row set and joins the results.
Last updated
Syntax
FROM source_table AS s
[INNER | LEFT] JOIN LATERAL (subquery) AS alias ON conditionIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
FROM clauseJOINLEFT JOINCROSS JOINWHERE clauseset-returning function