3 ms·
FROM users SELECT name, id, location WHERE name LIKE 'a%'; You know I think you're right.
by XorNot 3y ago
FROM users SELECT name, id, location WHERE name LIKE 'a%';
You know I think you're right.
- frogulis 3y agoGo further: `FROM users WHERE name LIKE 'a%' SELECT name, id, location` - after all, you can WHERE on things that aren't projected by SELECT
- deleted 3y ago[deleted]
- 6510 3y agoA human would grab the paper with the right table on it then search for the row he wants with his finger and finally gets the phone number from the row.
- user3939382 3y agoThere was an article on HN about this maybe 6 months ago. I’m in agreement.
- ellisv 3y agoEh. I’m not convinced by this. I may know what I want to query as often or more than knowing where it comes from. I suppose it could be nice if the user could specify clauses in an arbitrary order but it’d certainly add complexity. I don’t find it difficult to jump around a bit from clause to clause while writing a query. In fact, it’s incredibly rare to write a query straight through and have it do what you want it to do.
- 6510 3y agoO well, if we are going to be like that?: FROM users WHERE name LIKE 'a%' SELECT name, id, location (I should refresh the page before posting)
- blipvert 3y agoI might be wrong, but there’s nothing to stop a front end UI from accepting this syntax and then writing out canonical SQL to do the actual query, is there?
- valenterry 3y agoExactly, it puzzles me that tooling doesn't do that...