Home Answers Viewqa SQL What is the difference between UNION and UNION ALL in SQL?

 
 


hemant kumar
What is the difference between UNION and UNION ALL in SQL?
1 Answer(s)      2 years and 6 months ago
Posted in : SQL

What is the difference between UNION and UNION ALL in SQL?

View Answers

November 19, 2010 at 5:44 PM


Hi,

UNION is an SQL keyword used to merge the results of two or more tables using a Select statement, containing the same fields, with removed duplicate values(selects distinct values). UNION ALL does the same, however it persists duplicate values i.e. UNION ALL selects all values.

Thanks,









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.