Merging two Tables
Posted by: Karl Cox
Date: March 07, 2005 02:01PM

I am trying to figure out the SQL to take care of this table merge: I have two tables of identical structure (TABLE A & TABLE B) that I would like to merge into a new table (TABLE C). I want identical rows from each table to not show up as two separate rows in the final table (I do not want duplicates).

EX:

TABLE A
WORKER ID----SKILL ID----SKILL RATING
1000------------2001------------3
1001------------2459------------1

TABLE B
WORKER ID----SKILL ID----SKILL RATING
1000------------2001------------3
1003------------2923------------2

TABLE C
WORKER ID----SKILL ID----SKILL RATING
1000------------2001------------3
1003------------2923------------2
1001------------2459------------1

NOTE: the row containing a WORKER ID of 1000 was not duplicated in TABLE C

I'm running MySQL 3.23.49

Thanks,

-Karl

Options: ReplyQuote


Subject
Written By
Posted
Merging two Tables
March 07, 2005 02:01PM
March 07, 2005 07:46PM
CMS
March 10, 2005 04:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.