C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Syntax of UNION ALL in SQl Server 2000


Posted Date: 13 Aug 2008    Resource Type: Code Snippets    Category: SQL
Author: Kundan Kumar SinhaMember Level: Gold    
Rating: Points: 10



We can combine the results of two or more Select statements into a single result set by using the UNION ALL operator. To combine the results of multiple queries in a single result set with the condition that the number of columns must be same in each query and the format of each data type must be same of corresponding columns.

Syntax for the Union All Command is given below.


SELECT Field_names FROM Table_Name1 WHERE Condition

UNION ALL

SELECT Field_names FROM Table_Name2 WHERE Condition


The difference between UNION and UNION ALL is, in UNION we will not get the duplicate record, but in UNION ALL we can get the duplicate records if it exists among two tables.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Using Union All in Sql  .  Union All syntax  .  Union All in Sql  .  Syntax of UNION ALL in SQl Server 2000  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Delete dupliacte rows from a table
Previous Resource: Delete Duplicate Records in Sql Server 2000
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use