I want to take two tables and just put them next to each other in a result. When I do a join with out any 'on' clause or an on clause like this: '... join ... on 1' I get the cross product of the two tables, which is basically every combination of each entry in the two tables, this is not what I want, I just want to put them next to each other.
Asked
Active
Viewed 1,895 times
-1
-
2How would you match the row from left to the right? What would be the join clause? – Pentium10 Nov 30 '11 at 18:58
-
1How do you want them aligned? How do we know that Row1 on the left should appear at the same row as row1 on the right? – JNK Nov 30 '11 at 18:58
1 Answers
2
You could take this approach: rank every row in each table on some basis, then join the tables on the rank numbers.
Here are some questions about how to rank rows in MySQL:
-
1+1 - With a question as vague as this one, your answer seems to be right on spot – Lamak Nov 30 '11 at 19:43