This is unlikely to have a big impact, but if I had to choose, I would not do that either. Temporary tables are accessible through nested stored procedures, so if you donβt have a specific need to transfer data between procedures without performing any of them, this will help to avoid conflicts, if you use the same name, call the procedure recursively in a circular way (and this ), or you have another procedure that uses the same name and columns. Removing it from practice can hide some strange logical errors.
For example, Proc A creates a temporary table, then calls B. B and creates a table. Now either Proc A now refers to the temporary table created, or since Proc A is not nested inside B, Proc Mysteriously fails. It would be better if proc B fails when it tries to create a temporary table.
At the end of the day, SQL Server will clear them, but that will not stop you from running between the nested procedures.
source share