WHAT THE DIFFERENCE BETWEEN UNION AND UNIONALL?

Arun Singh

Total Post:310

Points:1550
Posted by  Arun Singh
 2066  View(s)
Ratings:
Rate this:
  1. Arun Singh

    Post:310

    Points:1550
    What the difference between UNION and UNIONALL?

    Union will remove the duplicate rows from the result set while Union All doesn’t.

  1. Prashant K

    Post:2

    Points:10
    What the difference between UNION and UNIONALL?

    Both commands combines the tables with common fields except ‘UNION’ displays all the rows from objects without looking at duplicate records whereas ‘UNION ALL’ looks for it and displays only unique records. Thus ‘UNION’ it slower than ‘UNION ALL’

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!