Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

union and union all difference

UNION: only keeps unique records
UNION ALL: keeps all records, including duplicates

SELECT City FROM student  
UNION  
SELECT City FROM student2

SELECT City FROM student  
UNION ALL
SELECT City FROM student2
 
PREVIOUS NEXT
Tagged: #union #union #difference
ADD COMMENT
Topic
Name
9+7 =