Local temporary tables are isolated in the scope of current session regardless its name. It means that #temp_table in the session 1 is not the same that #temp_table in the session 2. However, the names of constraints are stored in the metadata of tempdb and can produce duplicate name errors.
Collection of methods to generate random string in a single SQL statement
M1: Recursive string concatenation
On SQL Server the method is limited by 100 characters because of CTE recursion level limitation. The method has the performance issues when using in loops/joins because the table always have 100 rows generated every time.