Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I want to merge two tables using UNION but getting common primary key twice that i dont want. - I want one occurrence of primary key .
Example :
Table 1 Table 2
Id Name Country Id Name Country
1 Ed England 2 Megha India
2 Megha India 3 Ved Germany
3 Ved Germany 4 Ram Japan
Desired Output:
Id Name Country
1 Ed England
2 Megha India
3 Ved Germany
4 Ram Japan
Hi,
Could you share the query you are using (a screenshot of the query and output will be the best)? I suspect you are using UNION ALL, so the duplicates are kept. UNION should combine the tables into a distinct single result.
Best