1 2 3 4 5 6 7 8
USE plato; INSERT INTO Output WITH MONOTONIC_KEYS SELECT * FROM Input1 UNION ALL SELECT * FROM Input2 ORDER BY key, subkey;