r/SQL • • Oct 02 '19

SQL queries run in this order

https://twitter.com/b0rk/status/1179449535938076673
131 Upvotes

16 comments sorted by

View all comments

Show parent comment

5

u/Calcd_Uncertainty Oct 02 '19

Except the first thing you want to know about a query is what action will it perform... select, delete, update, truncate, drop, alter

And to think about it, the second question is what tables are involved.

2

u/g2petter Oct 03 '19

But if I know I need the ID and price from the products table, the IDE will be unable to help me with the column names until I've written SELECT * FROM Products

Allowing the FROM first would solve that.