[Solved] Selecting the right column

Both. In some rows, t2.number is number and in others t3.number is number. The result of the union all in a single result set. The result set doesn’t know the origin of the values in any particular column (although you could include another column with this information). 3 solved Selecting the right column

[Solved] MYSQL: Search for User ID in one table to search for data in 2 other tables, then show data from all 3 tables

SELECT * FROM section_user_map JOIN users USING (UID) JOIN verification USING (UID) WHERE SectionID = 65 AND CompleteDate BETWEEN ‘2012-05-09 12:00:00’ AND ‘2012-05-11 12:00:00’ See it on sqlfiddle. No UNION required. Outer join would only be required if you still want to return results for users who do not exist in one (or both) of … Read more