MySQL combined query Union

Some time ago, according to the demand, the Youtou plan was separately separated into a new table. When looking at SVN, I found that the colleague's combined query is to query the data of each table, and then use array_merge to merge, and then use array_multisort, array_colomn and array_unique Combination to sort the composition, although it is also a solution to the problem, but if you think of using MySQL's Union, it may be faster and better.

First look at a picture to get familiar with the results of each query

mysql_uoion_join

After looking at the above picture, I basically have an understanding of the use of this.

reference reading

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325125893&siteId=291194637