Temp tables named hash # refer to a single join.
Therefore, if two joins (also called “processes” or “SPIDs”) refer to a temporary table with the same #tablename , they will actually refer to different tables.
You can see this if you look in tempdb. There will be several tables with names such as #748B826C . These are actually temporary table variables, such as declare @t table (ix int identity primary key) and temp tables name with a hash.
Thus, provided that these are different connections and not recursive triggers, there should be no problem.
however, if you are concerned about the possibility of recursive triggers, you should use table variables instead. They are limited to the scope of a batch or stored procedure.
source share