Thin films of Cd (y) Zn1 - y O and Mg (x) Zn1 - x O (y = 0-0.35, x = 0-0.45) ternary alloys have been grown by pulsed laser deposition onto sapphire substrates. The record solubility limits of Cd (y = 0.3) and Mg (x = 0.35) have been achieved in hexagonal zinc oxide. The mismatch of the lattice parameters a of Cd0.2Zn0.8O and Mg0.35Zn0.65O does not exceed 1%; in this case, the band gap discontinuity is 1.3 eV. The surface roughness of the films does not exceed 2.5 nm at x = 0-0.27 and y = 0-0.20.