Stored procedures can reference temporary tables that are created during the current session.
Temporary tables with names beginning with “#” that are created within stored procedures are not saved when the procedure exits.
Create a temporary table
Insert data into the table
Run queries on the table
Call other procedures that reference the table
You can use create table tempdb...tablename from inside a stored procedure to create temporary tables without the # prefix. These tables persist when the procedure completes, so they can be referenced by independent procedures.
Follow the steps for temporary table names beginning with “#” to create these tables.