Tulio Carrion-figueroa Tulio Carrion-figueroa - 6 months ago 49
MySQL Question

How to UNION a non-union compatible table

The question im suppose to answer is, Create a table that results from adding UNION ralational operator to BOOTH and MACHINE.

This are the tables.

BOOTH table
BOOTH table

MACHINE table
MACHINE table

Can someone show me the relational algebra equation for this answer. I'm lost :((

Answer

You could really just alias the names of the columns from both tables so they are the same.

select Machine_Product as Booth_Product, Machine_Price as Booth_Price
from MachineTable
union
select Booth_Product, Booth_Price
from BoothTable
Comments