SQL Puzzlers
If you're a Java developer, maybe you know a concept of a "Java puzzler", maybe even the book Java Puzzlers: Traps, Pitfalls, and Corner Cases from Joshua Bloch. The term "puzzler" denotes a piece of code that does not work in the expected way, thanks to lesser-known features and specialities. But why the puzzlers might not exist in other languages besides Java - e.g. in SQL?
From time to tome, when working with SQL or one of the procedural extensions (PL/SQL, PL/pgSQL), I hit a piece of code that does not work the way I expect, and I often spend a lot of time worrying my head with the reasons of this behavior. I'll try to turn the nice "gimmicks" into a puzzler, so you can worry your head too.




