(a) A sale of lands under a junior judgment shall pass the title of the defendant, subject to the lien of all prior judgments and decrees then in force.
(b) The money arising from the sale of lands under a junior judgment shall be applied to the payment of the judgment under which it may have been made.