Table A Table B ------- ------ d1 1 d2 2 d3 3 d4 4 d5 5 d6 6 d7 7 d8 8 d9 9 d10 10 d11 11 d12 12 d13 13 d14 14 d15 15 d16 16 d17 17
Table C col1 col2 d1 1 d1 2 d1 3 d1 4 d1 5 d1 6 d1 7 d1 8 d1 9 d1 10 d1 11 d1 12 d1 13 d1 14 d1 15 d1 16 d1 17 d2 1 d2 2 d2 3 d2 4 d2 5 d2 6 .. .. ..
Cross join
SELECT col1,col2 FROM A,B
SELECT * FROM (SELECT 'd1' as col1 UNION SELECT 'd2') AS T1, (SELECT 1 as col2 UNION SELECT 2) AS T2 ORDER BY col1
col1 col2 d1 1 d1 2 d2 1 d2 2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)