The court may also render judgment against the parties liable for the payment of the debt secured by the mortgage and direct at the same time the sale of the mortgaged premises. Such judgment so rendered may be entered and docketed in the clerk's office in the same manner as other judgments. Upon the sale of the mortgaged premises the officer making the sale under the order of the court shall credit upon the judgment so rendered for the debt the amount paid to the plaintiff from the proceeds of the sale.
S.C. Code § 29-3-650