Transact SQL – Retrieving the structure of Temp Tables

Background Out of laziness, I sometimes create temporary tables on the fly. Sample Select/Into   Metadata Let us get metadata info on our temp table columns Outline Checked the code for sp_help using sp_helptext 'sp_help' and used that stolen code here. Code Output Script Temp Tables Stored Procedure script.sp_TableTempStructure Code Invocation   Output