Hello @mokwenak
" However, this behavior doesn’t seem possible in Microsoft SQL....".
This behavior is possible in MS SQL Server but not in the same way as SAS. Here are some hints.
1.Once can always alter table and add /remove columns
2.MS SQL server has the option to create session scope temporary table. At the end of the session the data is lost. Something like SAS work in functionality . They can be used as an intermediate storage.
3.There is another feature called common table expressions which are named result set that can be withing the same query.
Ultimately it depends on your exact needs and the ability to make use of the available features.