0

What is the difference between join and union

25th Aug 2018, 2:53 PM
Robert ferreira
Robert ferreira - avatar
2 Respostas
+ 2
Joins and Unions can be used to combine data from one or more tables. The difference lies in how the data is combined. In simple terms, joins combine data into new columns. If two tables are joined together, then the data from the first table is shown in one set of column alongside the second table’s column in the same row. Unions combine data into new rows. If two tables are “unioned” together, then the data from the first table is in one set of rows, and the data from the second table in another set. The rows are in the same result.
25th Aug 2018, 3:10 PM
BraveHornet
BraveHornet - avatar
0
So it is basically the same thing, but join is for columns and union is for rows?
25th Aug 2018, 3:16 PM
Robert ferreira
Robert ferreira - avatar