1 2 3 4 5 6 7 8 9
USE plato; SELECT * FROM ( SELECT key, value from Input UNION ALL SELECT subkey as key, value from Input2 ) ORDER BY key, value ;