|
|
|
|
|
by shkkmo
298 days ago
|
|
Your approach only works with massive assumptions about the structure of the data or a very simplistic data structure. SELECT statments don't just use table names, they can use aliases for those table names, views, subqueries, etc. The FROM / JOIN blocks are where the structure of the data your are selecting from is defined. You should not assume you understand what a SELECT statement means until you have read those blocks. |
|
I can define the return format of my query in the SELECT statement, then adapt the data structure in the FROM block using subselects, aliases etc — all to give me the shape desired for the query.
If you've ever done complex querying with SQL, you'd know that you'd go back and forth on all parts of the query to get it right unless you knew the relations by heart, regardless of the order (sometimes you'll have to rework the FROM because you changed the SELECT is the point).