SqlUnion

class SqlUnion(kind, select)

A set operation (UNION, INTERSECT, EXCEPT). Created via SQL.union(kind, select). Inherits from SqlObj.

Parameters:
  • kind – Operation string — 'UNION', 'UNION ALL', 'INTERSECT', 'INTERSECT ALL', 'EXCEPT', 'EXCEPT ALL'.

  • select – A SqlQuery (SQL.select(), SQL.insert(), SQL.update(), or SQL.delete() with RETURNING) for the right side of the operation.

SQL.union('UNION', other_select)
SQL.union('UNION ALL', other_select)
SQL.union('INTERSECT', other_select)
SQL.union('INTERSECT ALL', other_select)
SQL.union('EXCEPT', other_select)
SQL.union('EXCEPT ALL', other_select)