3 ms·
Having not written a SQL parser. But I would assume there is a grammar parser in there that puts the items into some IR like language or structure that runs it
by sumtechguy 6y ago
Having not written a SQL parser. But I would assume there is a grammar parser in there that puts the items into some IR like language or structure that runs it. The big ones call it a query plan. So you in theory could flip them around as long as the query plan was the same. You would just need to basically convince MS and Oracle and all the other DB projects to do/try it. Not sure they would see the benefit though. In my head they are backwards but in their design it may be fine. Ideally the keywords could be in any order. But that would probably break some implicit ideas that those keywords convey (looking at you having and group by).
- smichel17 6y agoHmm, I thought I remembered reading something to the effect that this was currently possible, but now trying to find more information about it I'm coming up empty.
- sumtechguy 6y agoWith oracle if it exists would probably be a compiler directive. In MSSQL would be some sort of DBCC command. Not sure with the other DBs as I do not use them as much and have not needed to tweak them at that level.