6 ms·
I would like coffee from Starbucks. I don't say, from Starbucks I would like coffee
by Grazester 3y ago
I would like coffee from Starbucks.
I don't say, from Starbucks I would like coffee
- b86754 3y agoRight but that’s not how SQl executes unfortunately. You go to Starbucks then ask for what you need. SQL does a Cartesian product of all the tables you need, then filters with the ON clause. Only then can you “order” what you want in SELECT. In standard SQL syntax you’re essentially asking for what you want at your house then driving to a Starbucks. More readable but doesn’t follow the execution order at all.
- infamia 3y agoUnless I'm doing SELECT *, I almost always want quite a few pieces of data. Therefore it is more natural to say: "Let's go to Starbucks and get coffee, soda, danishes, sandwhiches, soda, and a coffee cup." It would be confusing to mention all the various items first and the store near the end. "Let's get coffee, soda, danishes, sandwhiches, soda, and a coffee cup from Starbucks." This aside, the fact that doing the FROM near the end prevents autocompletion, is plenty enough reason to change the ordering in my opinon.