0

What is the difference between union and join with group by ?

If you use GROUP BY you dont get duplicated data too.

20th Feb 2017, 11:37 AM
Ondra
Ondra - avatar
3 Respostas
+ 1
Union combines the result of two SQL statements. In case of join, you try to fetch related data from other tables, say using the foreign key.
20th Feb 2017, 8:06 PM
Daniel
Daniel - avatar
+ 1
UNION combines the results of two or more queries into a single result set that includes all the rows that belong to all queries in the union. JOINs indicate how SQL should use data from one table to select the rows in another table.
1st May 2017, 9:26 PM
Hakob Baghdasaryan
Hakob Baghdasaryan - avatar
0
in join operator if two tables having join means same condition only returned but in union operator it performs union operation of two tables
27th Jul 2017, 5:58 AM
Pachipulusu pream kumar
Pachipulusu pream kumar - avatar