Hashed (#) temporary tables

Hashed temporary tables:

Create hashed temporary tables by including a hash mark (“#”) as the first character of the table name:

create table #temptable (...)

or:

select select_list 
into #temptable ...

When you create indexes on temporary tables, the indexes are stored in the same session assigned to the temporary database where the hashed table resides:

create index littletableix on #littletable(col1)