If the real estate is sold pursuant to a judgment of foreclosure of a mortgage or other lien in which real estate situated in several counties is described and which instrument has been duly recorded prior to the commencement of the action, in all of said counties, or if it is sold pursuant to an attachment of real estate in several counties and the notice of levy of such attachment has been duly recorded in all such counties, any or all of said real estate may be sold in the county in which the judgment was rendered, by the sheriff of such county, unless the court shall in the judgment of foreclosure or upon the attachment proceedings otherwise specifically direct.
SDCL 15-19-11