SQL server 如何根据字段值的不同去关联不同的表的sql?
用union all吧
select * from a inner join b on a.id = b.id where a.typeid = 1 union all select * from a inner join c on a.id = c.id where a.typeid = 2