0

What is the use of union ?

30th Jan 2017, 4:58 PM
jatin sharma
3 ответов
+ 2
where we want to join two query at one SQL statement.this is two types. UNION and UNION ALL
30th Jan 2017, 6:50 PM
Ajit Kushwaha
Ajit Kushwaha - avatar
0
when we use union in two sets then it gives distinct records. union all gives all the records in the set
30th Jan 2017, 7:01 PM
முருகன் சுந்தரபாண்டியன்
முருகன் சுந்தரபாண்டியன் - avatar
0
The SQL UNION operator combines the result of two or more SELECT statements. It removes duplicate rows between the various SELECT statements. Syntax SELECT column_name(s) FROM table1 UNION SELECT column_name(s) FROM table2; Example SELECT City FROM Customers UNION SELECT City FROM Suppliers
3rd Feb 2017, 1:06 PM
Akwin Lopez
Akwin Lopez - avatar