MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't
ask)
I have database Spring with table Students
I have database Summer with table Students
I am tasked to produce a query of all students in both tables with no
duplicates. No clue whatsoever.
I'm thinking an INTERSECT followed by 2 UNION SELECT statements, but
how far off am I? The tables are absolutely identical in every way
including indexes; the data MIGHT be identical (same data might be in
Spring.Students and Summer.Students ), however, that won't always be the
case. The column Spring.Students .id will not share the same value as
Summer.Students .id as data can be entered within separate sequences
even if the data in both tables is absolutely identical.
Am I on the right track with INTERSECT/UNION or what do you recommend?
Thanx
Phil
ask)
I have database Spring with table Students
I have database Summer with table Students
I am tasked to produce a query of all students in both tables with no
duplicates. No clue whatsoever.
I'm thinking an INTERSECT followed by 2 UNION SELECT statements, but
how far off am I? The tables are absolutely identical in every way
including indexes; the data MIGHT be identical (same data might be in
Spring.Students and Summer.Students ), however, that won't always be the
case. The column Spring.Students .id will not share the same value as
Summer.Students .id as data can be entered within separate sequences
even if the data in both tables is absolutely identical.
Am I on the right track with INTERSECT/UNION or what do you recommend?
Thanx
Phil
Comment