|
@@ -14,7 +14,7 @@ But the need predates 1997. And, well, DB2 users were out in the cold until less
|
|
|
|
|
|
As it turns out, enterprising hackers can do all sorts of amazing things. See, there's a SQL operator called `UNION`, which is a name that absolutely makes sense if you think about data in a very specific way.
|
|
|
|
|
|
-Remember [sets](https://en.wikipedia.org/wiki/Set_(mathematics\))? Maybe as a data structure, maybe from formal logic, maybe from advanced math? Well, if you think about the results of a SQL `SELECT` as a set, then the `[UNION](https://en.wikipedia.org/wiki/Union_(set_theory\))` operator does exactly what you think it would: it takes the results of two different `SELECT` statements and delivers the set of unique results[^sets].
|
|
|
+Remember [sets](https://en.wikipedia.org/wiki/Set_(mathematics))? Maybe as a data structure, maybe from formal logic, maybe from advanced math? Well, if you think about the results of a SQL `SELECT` as a set, then the [`UNION`](https://en.wikipedia.org/wiki/Union_(set_theory)) operator does exactly what you think it would: it takes the results of two different `SELECT` statements and delivers the set of unique results[^sets].
|
|
|
|
|
|
For example[^postgres]:
|
|
|
|