I have two tables with the same primary key but different other fields...
Let's say table A, with 1000 rows, and table B with 600 rows.
For instance, let's say also only 400 of ids exactly match; the other don't. They are two sets sharing only 400 elements, so we'll have 1200 different elements in total.
I'll call the keys A.id and B.id ....
Well. I would reach the following results. What are the best MySQL selects to do :
1) a new table with 1200 elements and fields coming from both tables; this should be a classical SELECT OUTER JOIN... ?
2) a new table with the 1000 A rows and, where found, the fields coming from the 400 rows of B of the shared subset
3) a new table with all the A rows not existing in B (600 rows)
4) a new table with all the B rows not existing in A (200 rows)
Please, help me!!!
I'm in trouble!
Thanks very very very much
Bye.
#If you have any other info about this subject , Please add it free.# |