create table A(A1 char(10),A2 char(10),A3 char(10))
insert into A select 'a01','a02','a03' 
union 
select 'a11','a12','a13'
create table B(B1 char(10), B2 char(10))
insert into B select 'b01','b02'
union
select 'b11','b12'select identity(int,1,1) as id, a.*  into c from a
select identity(int,1,1) as id, b.*  into d from b
Select c.A1,d.B1 into e from c left join d on c.id=d.idselect * from e
drop table A
drop table B
drop table C
drop table D
drop table E