0
What is the difference between union and join with group by ?
If you use GROUP BY you dont get duplicated data too.
3 Respuestas
+ 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.
+ 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.
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