Temporary Tables


 

There is a feature of SQL I have not seen used much and probably with good reason. It’s the use of temporary tables. These are declared with the expected DDL. Since they were relatively easy to add to the language, they been around for a while. The bad news is that in the early days SQL programmers tended to write code that looked more like a procedural language.

They mimicked how you would hang a scratch tape and use it to either hold complicated intermediate results or to hold final results from a procedure that you wanted to pass on