Using MySQL UNION Operator you can combine two or more result set from a multiple table into a single result set.
UNION operator eliminates duplicate rows from the result set even you forgot to use DISTINCT operator. UNION ALL allows duplicate rows remain in the result.
In the corresponding SELECT statements the number of columns appears must be equal.
SELECT userID id, userName name FROM users UNION SELECT orderUser id, orderName name FROM orders
Here we combine the data from users and orders tables into a single result set.
Are you an owner of a small business who’s trying to come up with ways…
Introduction When patients bring me their lab reports, the confusion is almost always the same.…
Are you excited about remodeling your house after a long time? Perhaps if you're planning…
The practice of yoga teaches us to be present, patient and mindful of our decisions.…
As we are once again allowed to go outside, nearly everyone is planning to go…
How do you find a cleaning company that will take excellent care of your business…