|
Posted by may_sapak1234 on 11/15/07 05:14
hi everyone. i'm new to sql server.
i have 2 tables. i want to return \all rows in both tables for each
row in table2. please refer to the following. sorry can't get my
thoughts across clearly.
thanks in advance
create table table1 (
c1 char(1),
c2 tinyint
)
insert into table1 values ( 'A', 1 )
insert into table1 values ( 'B', 2 )
insert into table1 values ( 'C', 3 )
create table table2 (
c1 char(1),
c2 tinyint
)
insert into table2 values ( 'D', 4 )
insert into table2 values ( 'E', 5 )
--return table1.*, table2.* from table1 for each row in table2
/*
table1 tabl1 table2 table2
c1 c2 c1 c2
A 1 D 4
B 2 D 4
C 3 D 4
A 1 E 5
B 2 E 5
C 3 E 5
*/
[Back to original message]
|