© Kim Berg Hansen 2020
K. Berg HansenPractical Oracle SQLhttps://doi.org/10.1007/978-1-4842-5617-6_2

2. Pitfalls of Set Operations

Kim Berg Hansen1 
Middelfart, Denmark

SQL and set theory are quite related, but in practical daily life, I think many developers (myself included) do not worry too much about theory. Maybe as a consequence thereof, it is typically more seldom that I see the set operators used than joins. Most often you get along with joins fine, but now and again, a well-chosen use of a set operator can be quite nice.

But maybe because we don’t use the set operators as much, I see too often code where the developer unwittingly fell into one of the pitfalls that exists, specifically concerning using distinct sets or sets with duplicates. ...

Get Practical Oracle SQL: Mastering the Full Power of Oracle Database now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.