Monday, July 23, 2012

UNION VS UNION ALL

UNION VS UNION ALL

UNION

The UNION command is employed to pick connected info from 2 tables, very similar to the be a part of command. However, when using the UNION command all selected columns have to be compelled to be of constant knowledge kind. With UNION, solely distinct values are selected.


UNION ALL

The UNION ALL command is equal to the UNION command, except that UNION ALL selects all values.

The distinction between Union and Union all is that Union all won't eliminate duplicate rows, instead it simply pulls all rows from all tables fitting your question specifics and combines them into a table.

A UNION statement effectively will a pick DISTINCT on the results set. If you recognize that each one the records came back are distinctive from your union, use UNION ALL instead, it offers faster results.

11 comments:

  1. Looking forward for more information..

    Dikshita Sharma

    ReplyDelete
  2. Great post. All readers will definitely like this post. Looking forward for your next post.

    ReplyDelete
  3. Nice post, things explained in details. Thank You.

    ReplyDelete
  4. with what you're trying to say. I'm sure you'll reach so many people with what you've got to say..

    ReplyDelete
  5. You notice so much its almost arduous to argue with you. Thanks for this post..

    ReplyDelete
  6. Very great post. I simply stumbled upon your blog and wanted to say that I have really enjoyed browsing your weblog posts. After all I’ll be subscribing on your feed and I am hoping you write again very soon!

    ReplyDelete
  7. Blogging is the new poetry. I find it wonderful and amazing in many ways.

    ReplyDelete
  8. writing, it's rare to look a nice weblog like this one these days..

    ReplyDelete
  9. I am extremely impressed along with your writing abilities and also with the format in your blog. Anyway stay up to the excellent high quality writing, it's rare to find a nice weblog like this one these days.

    ReplyDelete
  10. It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us.

    ReplyDelete