What are the key points for mysql to use union?
This article mainly introduces the relevant knowledge of "what are the points for attention in the use of union in mysql". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope this article "what are the points for attention in the use of union in mysql" can help you solve the problem.
1. The union operator is used to combine the results of more than two select statements into one result set. Multiple select statements delete duplicate data.
2. When using union to merge result sets, the two result sets are required to have the same number of columns.
Example
Select playerno, townfrom PLAYERSwhere town = 'Inglewood'unionselect playerno, townfrom PLAYERSwhere town =' Plymouth';, this is the end of the introduction of "what are the points for attention in using union in mysql". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.