Re:Against SQL
by mickael-kerjean on Saturday July 10, 2021 @07:08AM
(#27792579)
After years of doing that same technique, in my new job, people would write:
I couldn't find anyone telling me the difference between those 2 ways to write a query, do someone know more about this?
[ Parent
| on HN ]
Re:Against SQL
by kthejoker2 on Saturday July 10, 2021 @11:08AM
(#27793834)
There's no performance difference in the engine.
The way you have written it (ANSI-89)used to be the only way joins could be written.
The second one (ANSI-92) was introduced to allow for composability since the entities being joined and the join condition are next to each other in the code and multiple joins can be generated one after the other.
IMO it also enhances developmemt quality of life since you can understand a new-to-you query faster (especially complex ones), you can just comment out a join in one line when testing replacement, cut and paste between queries easier, etc.
An SO question on the topic
https://stackoverflow.com/questions/334201/why-isnt-sql-ansi...