Pitfalls of Set Operations
Kim Berg Hansen · Apress eBooks · 2020
SQL and set theory are quite related, but in practical daily life, many developers (the author included) do not worry too much about theory. Maybe as a consequence thereof, it is typically more seldom to see the set operators used than joins. But maybe because the set operators aren’t used as much, too often code is seen where the developer unwittingly fell into one of the pitfalls that exists, specifically concerning using distinct sets or sets with duplicates. And when you then add that the set and multiset operators have opposite defaults, confusion can easily abound. This chapter attempts to clear that confusion.