Upon a sale of real property the purchaser is substituted to, and acquires all the right, title, interest, and claim of the judgment debtor thereto; and when the estate is less than a leasehold of two years unexpired term, the sale is absolute. In all other cases the real property is subject to redemption as provided in this code.
SDCL 15-19-17