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:
Exist only for the duration of the user session or for the scope of the procedure that creates them
Cannot be shared between user connections
Are automatically dropped at the end of the session or procedure (or can be dropped manually)
When you create indexes on temporary tables, the indexes are stored in tempdb:
create index tempix on #temptable(col1)