Hacker News new | ask | show | jobs
by plasticsyntax 3630 days ago
SQL uses a natural language syntax.

Regarding your first question - In English, most people would agree that "grab the beer from the fridge" is more natural than "from the fridge grab the beer". For what it's worth I've always considered this aspect of SQL maddening and I always start with SELECT * and work my way back later.

Regarding your second, this is probably because FROM means something different from JOIN. FROM indicates you are starting a block of JOINED tables. Technically if the syntax wasn't natural it might look like:

SELECT * FROM JOIN FOO ON NOTHING JOIN BAR ON FOO.ID = BAR.FooID

Given how annoyingly verbose the syntax is already I'm happy to go with what we were given.

1 comments

Aha! The natural English grammar pointer is a nice one... sure enough I now! remember the "natural language syntax" idea ;)

I'm happy too, no doubt... I guess, given how long it already "survived" SQL is quite "successful". Cheers