也可用下面的方法,不过比较繁琐
Select id,
(Select Field1 From Table1 Where id=AA.id) as Afield1,
(Select Field2 From Table1 Where id=AA.id) as Afield2,
(Select Field3 From Table1 Where id=AA.id) as Afield3,
....... ,
(Select Field1 From Table2 Where id=AA.id) as Bfield1,
(Select Field2 From Table2 Where id=AA.id) as Bfield2,
(Select Field3 From Table2 Where id=AA.id) as Bfield3,
........
From
(Select id as tmpid from Table1
Union
Select id as tmpid from Table2) AA