Come ottengo la struttura della tabella temporanea, quindi eliminare la tabella temporanea. C'è uno sp_helptext per le tabelle temporanee? Finalmente è possibile eliminare la tabella temporanea nella stessa sessione o finestra di query?
Esempio:Ottenere la struttura della tabella temporanea (come generare script sql) e deselezionare la tabella temporanea per l'istanza corrente
select *
into #myTempTable -- creates a new temp table
from tMyTable -- some table in your database
tempdb..sp_help #myTempTable
Uso CTE in SQL Server sembra di eliminare la tabella temporanea automaticamente: https://technet.microsoft.com/en-us/library/ms190766%28v=sql.105%29.aspx?f=255&MSPPError = -2147217396 – RetroCoder