Selecting distinct merged results from multiple tables in MySQL

I had an issue recently where I needed to get a list of keywords for one of my websites. The website uses two databases, one for the blog, and a different one for the main part of the site. So I wanted to select the unique (distinct) keywords from the keyword tables on both databases.

This is the query I ended up with, which I will explain in a moment:

Continue reading

Posted on by xoogu, last updated