Skip to content

Set Operations

And, Not, Or

  • these are put inside the WHERE or HAVING clauses

UNION, INTERSECTION

  • these are put between two SELECT clauses
  • append all to the keyword to retain duplicates

Impact of null values

  • the result of any comparison with a null value is returned as unknown
  • false and unknown is false, true and unknown is true (absorption law)
  • every other comparison returns unknown
  • if unknown is returned to the WHERE clause, then it is treated as false.