Certainly some data engines provide features just like this, so I guess your point is that these have not migrated into such standard use as to be in them all, and to then not be handled with a language standard.
For example, Teradata has two of these:
Temporary tables, whose existence only lasts with the session. Disconnect and the table vanishes.
Global Temporary tables, whose definition survives across sessions but the data in them vanishes with the sessions.
Neither is the exactly the same as what you want. And all present some form of management issue when what you're writing needs to shift from exploratory code to being a production script of data actions in sequence to run again and again.
e.g. To redo a temporary within a session you still have to do a DROP TABLE to get rid of it before recreating it differently.
Next, #4. Select statements are not dynamic
Certainly some data engines provide features just like this, so I guess your point is that these have not migrated into such standard use as to be in them all, and to then not be handled with a language standard.
For example, Teradata has two of these:
Neither is the exactly the same as what you want. And all present some form of management issue when what you're writing needs to shift from exploratory code to being a production script of data actions in sequence to run again and again.
e.g. To redo a temporary within a session you still have to do a DROP TABLE to get rid of it before recreating it differently.
See complaint #10 😄
It doesn't help if some SQL dialect, somewhere, has a feature. I need it for all of them!