Truly temporary tables

You can create truly temporary tables by using “#” as the first character of the table name:

create table #temptable (...)

or:

select select_list 
    into #temptable ...

Temporary tables:

When you create indexes on temporary tables, the indexes are stored in tempdb:

create index tempix on #temptable(col1)