Hashed temporary tables:
Exist only for the duration of the user session or for the scope of the procedure that creates them, and can be either manually or automatically dropped at the end of the session or procedure.
Cannot be shared between user connections
Are created in the temporary database assigned for the session.
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)