Equivalent to in SQL. The number of rows is always the sum of the number of rows from the two input tables. To replicate UNION DISTINCT, see set operations.

PRQL

SQL

  1. SELECT
  2. *
  3. FROM
  4. UNION
  5. ALL
  6. SELECT
  7. *
  8. FROM
  9. employees_2

Removes rows that appear in another relation, like . Duplicate rows are removed one-for-one.

  1. SELECT
  2. *
  3. FROM
  4. employees_1 AS t
  5. EXCEPT
  6. ALL
  7. *
  8. FROM
  9. employees_2 AS b

PRQL

SQL

  1. SELECT
  2. FROM
  3. employees_1 AS t
  4. INTERSECT
  5. ALL
  6. SELECT
  7. *
  8. FROM

Don’t mind the and _param., these are compiler implementation detail for now.