Hacker News new | past | comments | ask | show | jobs | submit login

The only problem I have with SQL is that `SELECT` comes first instead of last. It prevents the development of good tooling.



well its trade off , its easier to read, maybe a bit harder to write

also remember that sql is a query language not a programming language, so the main target are not programmers

also think of it this way, it might help, you start with that you really want

  select firstname, lastname, hobby 
so you start by saying you want a table (a relation, a relvar) that have first name , last name etc ... this is what you want then you tell me where to get it from

  from users 
so the order is not bad , it like saying, get me a a drink from the box you wont say, from the box get me a drink

select first resembles more natural language, and is more declarative

from first, is more procedural

what i want first, then how --> declarative

how to find what i want, then what i really want --> procedural


If I start deciding on my with the table, my query editor can tell me what I can select. I've never seen a query editor that looks at the select table and suggests tables based on that.


Could you elaborate? I'm curious why that makes a difference.


For auto complete, for example.


Select Na..

vs

From Users Select Na...


You could qualify the names up front?

  select users.Na.. from ..
If your tooling doesn't work in the way you want with that I don't think there's reason to think it would if it were possible to write

  from users select Na..
either.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: