I want to perform a cartesian product between two SELECT statements as
SELECT 1, 2 INNER JOIN SELECT 3, 4 ;
I expect the result to be every combination of (1,2) with (3,4), like:
1 3
2 3
1 4
2 4
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the CROSS JOIN clause
where MyTable1 has two rows containing 1 and 2; and MyTable2 has two rows containing 3 and 4.