Learn T-SQL Commands with Samples
Skip Navigation Links
Skip Navigation Links.
Expand DatabaseDatabase
Expand TableTable
Expand ViewView
Expand Stored ProcedureStored Procedure
Expand Data FilteringData Filtering
Expand Data GroupingData Grouping
Expand JoinsJoins
Expand TriggerTrigger
Expand CursorCursor
Collapse OperatorsOperators
Expand ConstraintsConstraints
Expand FunctionsFunctions
Expand Conditional ProcessingConditional Processing
Expand LoopingLooping
Expand Error HandlingError Handling
Expand v.IMP Queriesv.IMP Queries
Expand XMLXML
Expand Query PerformanceQuery Performance
Expand QueriesQueries
Expand NormalizationNormalization
Expand CreateCreate
     

Union

 
Continents
Country Continent
India Asia
USA N.America
Italy Europe
Continents1
Country Continent
Italy Europe
India Asia
Ghana Africa
      
---- Used to combine the results of two or more SELECT statements into a single result set. UNION Does not Display Duplicate Records.
SELECT * FROM Continents UNION SELECT * FROM Continents1
      
Output
Country Continent
Ghana Africa
India Asia
Italy Europe
USA N.America