Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 27th Apr 2016, 02:19 AM   #1
Warrior Member
 
Join Date: 2016
Posts: 16
Thanks: 0
Thanked 3 Times in 2 Posts
Default
What is the difference Between Union And Union All in SQL Server?
Share on: 
fb share twitter share gplus share more share

The UNION command is used to select related information from two tables, much like the JOIN command.
The UNION ALL command is similar to the UNION command, except that UNION ALL selects all values.
Any other difference Between Union And Union All in SQL Server?

karthikaqpt is offline  
Unread 5th May 2016, 12:24 AM   #2
HyperActive Warrior
 
Join Date: 2016
Posts: 142
Thanks: 1
Thanked 25 Times in 23 Posts
Default
Re: What is the difference Between Union And Union All in SQL Server?
Share on: 
fb share twitter share gplus share more share

Union internally uses Distinct to sort the record for only unique records but it is slow. Union All directly show all the records never matter whether there are duplicates or not. You can read more information with the examples here UNION VS UNION ALL in Sql Server with Example :: Advance Sharp
TomWest is offline  
Closed Thread


Bookmarks

Tags
difference, server, sql, union


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 01:39 PM.