Oracle SQL — Combining two tables, but taking duplicates from one?
问题 I have these tables: Table A Num Letter 1 A 2 B 3 C Table B Num Letter 2 C 3 D 4 E I want to union these two tables, but I only want each number to appear once. If the same number appears in both tables, I want it from Table B instead of table A. Result Num Letter 1 A 2 C 3 D 4 E How could I accomplish this? A union will keep duplicates and an intersect would only catch the same rows -- I consider a row a duplicate when it has the same number, regardless of the letter. 回答1: Try this: http:/