Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.

What is the difference between UNION and UNION ALL?

Experience Level: Medior
Tags: DatabasesSQL

Answer

UNION returns distinct rows, UNION ALL returns all rows. Because it doesn't need to find unique rows, it is faster.

Comments

No Comments Yet.
Be the first to tell us what you think.