[Solved] SQL Server Temp Table Insert from other temp table [closed]


You need cross join :

select t1.*, t2.category
from table1 t1 cross join 
       (select distinct category from table2) t2;

However if you don’t have duplicate then you can directly express it as :

select *
from table1 t1 cross join 
      table2 t2;

3

solved SQL Server Temp Table Insert from other temp table [closed]