• That explanation requires expanding slightly, because there is more than one type of temporary table.

    Local temporary tables (prefixes with '#') go out of scope when the exec command completes. However, use '##' to create a Global temporary table and the table can be accessed outside of the exec statement that created it.