不用触发器,可以直接用一个SQL语句:
select tabl1.*, tabl2.* into #t from tabl1 left join tabl2 
 on tabl1.id = tabl2.id
 where tabl1.type = 1 and tabl2.status = 1