1.

What Is Union?

Answer»

Join is DATA retrieval operation that combines multiple query outputs of the same structure into a single output. By default the MySQL UNION removes all duplicate rows from the result set even if you don’t explicit using DISTINCT after the keyword UNION.

SELECT customerNumber ID, contactLastname name FROM customers UNION SELECT employeeNurrber id, firstname name FROM EMPLOYEES

id name

103 Schmitt
112 KING
114 FERGUSON
119 Labrune
121 Bergulfsen

 

Join is data retrieval operation that combines multiple query outputs of the same structure into a single output. By default the MySQL UNION removes all duplicate rows from the result set even if you don’t explicit using DISTINCT after the keyword UNION.

id name

103 Schmitt
112 King
114 Ferguson
119 Labrune
121 Bergulfsen

 



Discussion

No Comment Found