5 ms·
I didn't know about RETURNING and enjoyed the post. It's a much nicer way to learn than via a textbook. A blog post doesn't have to be novel to have value. Tha
by biddlesby 6y ago
I didn't know about RETURNING and enjoyed the post. It's a much nicer way to learn than via a textbook. A blog post doesn't have to be novel to have value.
That said, I'm with you on the clickbait title. That really grinds my gears.
- oefrha 6y agoIf you never had a formal introduction to SQL, you can probably get a lot of value from a run-of-the-mill SQL textbook by scanning the table of contents and skimming the chapters/sections on topics new to you. (For the record, I learned SQL myself through fumbling. My first schema designs didn’t even have relations.) The problem with this blog post isn’t lack of novelty; rather, with the clickbait title, it piqued my interest but I ended up learning nothing, other than being reminded of my own terrible designs and queries back when I was a noob.
- badrequest 6y agoAll that is well and good, but RETURNING is a Postgres feature, not part of the SQL standard. I don't think a standard SQL textbook (especially one targeting something like MySQL/Sqlite) would have taught the author about it.
- fabian2k 6y agoI was quite surprised when I found out that RETURNING is actually a Postgres feature, and not standard. It just felt like such an obvious and extremely useful thing to have.
- AdrianB1 6y agoRETURNING exists also in Oracle PL/SQL and it is called OUTPUT in T-SQL. It may exist in other SQL variants.
- branko_d 6y ago> My first schema designs didn’t even have relations. I'm pretty sure your first schema designs had relations (tables). I can't speak for relationSHIPS (foreign keys) though... ;)
- Swizec 6y agoBut would any of us have seen this blogpost without the clickbait title? Probably not