
7 Cal.2d 121 (1936)
COMMERCIAL CENTRE REALTY COMPANY (a Corporation) et al., Petitioners,
v.
THE SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO et al., Respondents.
S. F. No. 15602. 
Supreme Court of California. In Bank.  
July 30, 1936.
 A. E. Shaw and J. A. Pardini for Petitioners.
 Tobin & Tobin for Respondents.
 CURTIS, J.
 Petition for writ of mandate directed to the Superior Court of the City and County of San Francisco and C.J. Goodell, Judge thereof, commanding them to desist from the trial of seven actions brought by the Hibernia Savings and Loan Society to foreclose seven separate mortgages against the petitioners herein. The seven actions are precisely alike in form, the only difference is that they are brought to foreclose seven separate mortgages. We will, therefore, treat the questions presented as if there were but one action involved.
 The corporate petitioner, which we will refer to as the corporation, executed in favor of the Hibernia Bank, two promissory notes, one for $32,500 and the other for $7,500, and gave a mortgage to secure said notes upon real property situated at the southeast corner of Clement Street and Tenth Avenue in the city of San Francisco. The mortgage contained a power of sale, under which the mortgaged property might be sold in the manner prescribed for the sale of property under a trust deed. The corporation defaulted in the payment of the notes, and the bank instituted an action to foreclose the mortgage. On the same day on which it filed the complaint to foreclose it also filed a "Notice of Breach of Obligation Secured by Mortgage and of Election to Sell Real Property described therein," in the office of the county recorder of said county. In this notice, it was recited that the bank "has elected to cause the real property to be sold in accordance with the power of sale contained in said mortgage." Pursuant to this notice after more than three months had elapsed after recording said notice, the bank, after giving notice by posting and publication as prescribed by law, sold said mortgaged property to satisfy the amount due on said notes. The bank then applied the proceeds of said sale to total amount of indebtedness upon the two notes, which left a balance due of $9,292.20 owing and unpaid. The bank then filed an amended and supplemental complaint setting up the facts of said sale, the application of the proceeds thereof, and that there remained $9,292.20 still due on said notes, and the further fact that at the date of the execution of said *124 notes, the petitioner, A. Ruef, owned 1997 shares of the 2,000 shares of the capital stock of the corporation, and petitioner, Pauline S. Sugarman, one share of said stock, and prayed for judgment against the corporation for the full amount of said deficiency and against the two other petitioners for their proportionate share of said indebtedness. The notes were executed September 22, 1928, prior to the amendment of the Constitution repealing the provision thereof making stockholders proportionally liable for the corporate debts. Upon the filing of said amended and supplemental complaint, the petitioners moved for a judgment of dismissal of said action upon the pleadings upon the ground that it appeared from the allegations of said supplemental complaint that the said Hibernia Bank had elected to proceed under the power of sale contained in the mortgage, and that it had so proceeded to and including a sale of the encumbered property involved in said action, and that, therefore, the properties having been removed from the jurisdiction of the court to proceed for a foreclosure of said mortgage in said action, the court had no jurisdiction to proceed to render any judgment, except one of dismissal. This motion was denied by the trial court. Petitioners then objected to said court proceeding further in the matter of the trial of said action upon the ground that there could be but one action for the recovery of any debt secured by a mortgage upon real property which must be in accordance with the provisions of section 726 of the Code of Civil Procedure, and that since the code provides for a sale by a commissioner and a deficiency judgment arrived at from the commissioner's report, the court had no jurisdiction to render any judgment except of dismissal where the encumbered property had been sold by the mortgagee under a power of sale, and so withdrawn from the foreclosure action. This objection was overruled and the case set for trial. A petition was then presented to this court for a writ of mandate or prohibition to compel the entry of a judgment of dismissal by the trial court or to halt the action of the trial court in proceeding with the trial of said action. This petition was denied by this court without prejudice, but upon application for a rehearing the petition was granted, and an alternative writ of mandate issued. *125
 We are satisfied that this is not a proper case for the issuance of a writ of mandate by this court and that the alternative writ of mandate should be discharged. This is so for the reason that the trial court had jurisdiction to hear and determine the issues as framed in the amended and supplemental complaint.
 [1] It is apparently conceded that if the bank had proceeded in the usual manner of foreclosing the mortgage according to the procedure outlined by section 726 of the Code of Civil Procedure, a judgment entered therein for a deficiency would have been valid and proper. In other words, no claim is made that the debt for which the mortgage was given as security was not a valid and existing debt at the date of the commencement of the foreclosure action. There is also no doubt that had the bank proceeded to sell the property under the power of sale contained in the mortgage and thereafter maintained a personal action to recover the balance due on the notes originally secured by the mortgage, a judgment for such balance would have been valid and proper. Although a suit to foreclose is the usual method of proceeding upon a mortgage, it was recognized as proper for a mortgage to contain a power of sale as early as Fogarty v. Sawyer, 17 Cal. 589, 592. Now section 2932 of the Civil Code expressly provides that, "A power of sale may be conferred by a mortgage upon the mortgagee or any other person, to be exercised after a breach of the obligation for which the mortgage is a security." And although it was once argued that a mortgagee had two remedies, one to foreclose the mortgage and the other to proceed under the power of sale contained in the mortgage, and that when it adopted the latter course it elected to look to the property only for a satisfaction of the debt, and that a suit for a deficiency judgment could not be maintained, this contention was declared untenable in the case of J. I. Case T. M. Co. v. Copren Bros., 32 Cal.App. 194 [162 P. 647]. The court there held that a personal action for the balance due on the note, after sale of the property under the power of sale contained in the mortgage, and the application of the proceeds thereof to the debt, was proper. If, therefore, the bank in this action had proceeded in the usual manner to foreclose its mortgage, it could have obtained a deficiency judgment in the foreclosure proceeding, or, if it had commenced a personal action subsequent *126 to the sale under the power given in the mortgage, it could have obtained therein a judgment for any deficiency remaining unpaid after the application of the proceeds of said sale upon said notes.
 [2] The question therefore presented is whether or not a mortgagee may amend a complaint in an ordinary foreclosure proceeding and in said amended complaint set forth facts of a sale under the power of sale contained in the mortgage and the application of the proceeds to the debt, and seek in said amended complaint a judgment for the balance still due upon the debt. Petitioner's position is as follows: The trial court is without jurisdiction to proceed further in the matter for the reason that at the present time there is no cause of action pending before it--that inasmuch as the mortgagee by a sale of the property under the power of sale took away from the trial court the power of the trial court to enter a decree of foreclosure and a sale by a commissioner, the cause of action thereby expired, and the mortgagee was thereafter without power to resurrect it or give it any vitality by amendment; and as the mortgagee's right to a deficiency judgment after a sale under the power of sale only accrued after the sale, and no new complaint was filed subsequent to the sale, no cause of action based upon those facts is now before the trial court.
 [3] This reasoning is necessarily based upon the theory that two different and distinct causes of action were stated, one in the original complaint in which a foreclosure of the mortgage was sought, and the other in the amended complaint in which payment of the balance due after the application of the proceeds of the sale to the debt was sought. We are satisfied, however, that under all the tests as to whether or not a new cause of action is set up, the supplemental and amended complaint did not state a new cause of action. The cause of action set out in the original complaint was the debt evidenced by the promissory notes. The cause of action set out in the amended complaint was the same debt, evidenced by the same promissory notes, a portion of which had been paid by the giving of credit by the mortgagee for the amount of the proceeds of the sale. In both instances it was the same debt.
 In the case of Frost v. Witter, 132 Cal. 421 [64 P. 705, 84 Am.St.Rep. 53], the original complaint, which was filed *127 two days before the lapse of four years from the maturity of the note, sought recovery upon the note alone. An amended complaint was filed four days later, which in addition set up a mortgage of even date with the note given to secure the note. A motion of the defendants to strike the amended complaint from the files upon the ground that it wholly changed the cause of action was denied. The court in that case pointed out that great liberality was permitted in this state in the matter of amendments, and defined "action" as "simply the right or power to enforce an obligation." " 'An action is nothing else than the right or power of prosecuting in a judicial proceeding what is owed to one,' which is but to say an obligation." The court further said: "The 'cause of action' is to be distinguished, also from the 'remedy'--which is simply the means by which the obligation or the corresponding action is effectuated,--and also from the "relief sought." The court then held that the order denying the motion to strike the amended complaint from the files was correct, saying, "Applying these definitions to the case at bar, it is clear that the cause of action set up in the original complaint was simply the obligation sought to be enforced,--that is to say, the obligation to pay the money agreed to be paid,--and that the only change that took place was in the remedy by which it was sought to enforce the obligation. ... In the present case, the cause of action was the obligation to pay the note, to which the mortgage was merely an incident. ... The original complaint was defective only by reason of failure to set up the mortgage, which, by a technical statutory rule, was necessary. The amendment simply cured this defect, and the effect of the judgment was simply to give to the plaintiff what he originally demanded, and some additional relief, which, though necessary under the statute, was of no value." As is pointed out in Rosemead Co. v. Shipley Co., 207 Cal. 414, 420 [278 P. 1038], there is but one form of action in this state, and a change by amendment from one kind of relief to another is not a change in the cause of action if the transaction is the same. The fact that the change is from legal to equitable--or vice versa--is not material. In the case of J. I. Case T. M. Co. v. Copren Bros., 45 Cal.App. 159 [187 P. 772], the question was presented whether or not a mortgagee of personal property, having brought an action to *128 recover a judgment for money claimed to be due and unpaid upon three certain promissory notes, setting forth in said complaint a sale of said property under a power of sale contained in the mortgage and the application of the proceeds thereof to the debt and seeking the balance due after the application of said proceeds to the debt, could thereafter, after the original judgment in his favor by the trial court had been reversed by the appellate court for failure of proof, amend its original complaint and seek for a foreclosure of the mortgage given to secure the payment of the three promissory notes. The court held that although the amended complaint changed the nature of the action from that of one at law for the recovery of the balance due on the promissory notes given by the defendants to plaintiff to that of a suit in equity to foreclose the mortgage, the amendment did not change the cause of action and the mortgagee could so proceed. The court held: "The complaint, as amended, proceeds upon precisely the same causes of action or seeks the establishment of precisely the same rights as those which were claimed by or asserted in the original complaint. The amended complaint does not change the character of the obligations sought to be enforced, but merely changes the remedy by which it sought to enforce the obligations, and therefore, does not change the causes of action set forth in the original complaint.""
 In holding that the amended complaint did not state a new cause of action and that the mortgagee was entitled to amend its original complaint in which the remedy of foreclosure was sought, we have in mind the case of Bank of Italy Nat. T. & S. Assn. v. Bentley, 217 Cal. 644 [20 PaCal.2d 940]. The action therein involved a trust deed, and the facts therein set forth expressly state, "It should also be mentioned that, although an amended complaint was filed in this action, it did not purport to be for a deficiency and it did not allege the sale by the trustees." In that case no cause of action actually existed at the time of the institution of the suit, as the cause of action did not accrue until after the security had been exhausted. It is to be noted in the instant case that a cause of action in fact existed at the time of the filing of the original complaint. This same cause of action continued to exist, although stated in a different form in the amended complaint, and although a different remedy *129 was sought by the amended complaint from that sought in the original complaint.
 [4] This brings us to the final question of whether or not the mortgagee by commencing an action in foreclosure had elected to foreclose the mortgage and was therefore without power to pursue the other remedy provided for in the mortgage of selling under the power of sale therein contained, applying the proceeds to the payment of the debt, and seeking a judgment for the balance still remaining due and unpaid. We do not think this is a case where the doctrine of election between remedies applies. Petitioners assume that by the filing of the complaint in foreclosure the mortgagee elected to proceed by foreclosure, but it is to be noted that on the same day on which the complaint was filed the mortgagee filed "Notice of Breach of Obligation Secured by Mortgage and of Election to Sell Real Property described therein," so that it can equally well be said that the mortgagee elected to proceed under the power of sale contained in the mortgage. The latter remedy was pursued until the sale ensued, after which it was impossible for the mortgagee to proceed with the foreclosure action. The remedy which the mortgagee has elected to pursue to the exclusion of the other remedy therefore is the exercise of the power of sale contained in the mortgage. Moreover, if it be conceded merely for the sake of argument that the mortgagee elected to proceed by foreclosure, such election did not preclude the subsequent exercise of the power of sale. [5] The doctrine of election of remedies is but a specific application of the equitable doctrine of estoppel, and it has been frequently held that a change in remedies does not bring about an election of remedies unless the change involves a prejudice to the opposing party. (Rosemead Co. v. Shipley Co., supra.) By the terms of the mortgage herein the mortgagee was given both the power to foreclose and the power of sale. At the time of the breach of the obligation, the petitioners' right to an equity of redemption was contingent upon the mortgagee's selection of the right to foreclose as the appropriate remedy to secure the payment of the debt, and if the mortgagee selected its other remedy of proceeding under the power of sale, the petitioners had no cause of complaint. Under the authority of McDonald v. Smoke Creek Live Stock Co., 209 Cal. 231 [286 P. 693], and Mayhall v. Eppinger, *130 137 Cal. 5 [69 P. 489], instead of filing an amended and supplemental complaint, the mortgagee could have proceeded to file a new and original complaint setting up the same facts as those contained in the amended and supplemental complaint, and could have recovered judgment for the balance due upon the debt after application of the proceeds of the sale under the power of sale contained in the mortgage. This being so, it is not apparent, since the mortgagee could have secured the same results by filing of a new complaint, how petitioners could have suffered any prejudice, because instead of said new complaint an amended and supplemental complaint was filed. No claim is made herein, and indeed none could be made, that the mortgagee was foreclosed from filing a new complaint by reason of the statute of limitations. The amended complaint was filed on June 14, 1932, which was well within the statutory period.
 We conclude that the trial court did not err in denying the motion to dismiss or in overruling the objections to proceeding with the trial under the issues framed by the amended and supplemental complaint.
 The petition is denied, and the alternative writ of mandate is discharged.
 Langdon, J., Shenk, J., Seawell, J., Thompson, J., and Waste, C.J., concurred.
