Opinion
EAGLESON, J.A bank depositor owed a debt of approximately $1 million to his bank. The debt was secured by a deed of trust on the depositor’s real property. Without first seeking to foreclose the security interest, the bank set off approximately $3,000 in the depositor’s accounts in partial satisfaction of the debt. The debtor protested to the bank, contending the bank was required first to foreclose its security interest. The bank responded by reconveying the deed of trust to the debtor and then filing suit to collect the remainder of the debt.
The question before us is whether the bank’s setoff without first foreclosing its real property security interest precludes this action by the bank to recover the balance of the depositor’s debt. We hold the bank’s action on the debt is not precluded.
Facts
Defendant Anton J. Wozab was president and majority shareholder of Anco Fire Protection, Inc. (Anco). His wife, Dorothea Wozab, was an Anco director. Anco had a line of credit with plaintiff Security Pacific National Bank (the bank) in excess of $1 million. Anco also had demand deposit accounts with the bank. The Wozabs had a term savings account and demand deposit accounts with the bank. The Wozabs executed written continuing general guaranties to the bank for its loans or advances to Anco. The bank became concerned with Anco’s financial condition and, after discussions between Anton Wozab and the bank, the Wozabs executed a deed of trust on their personal residence as security for their continuing guaranties.
The bank became concerned that Anco might file a bankruptcy petition. To reduce Anco’s debt as much as possible, the bank set off $110,635.19 in Anco’s demand deposit accounts and $2,804.82 in the Wozabs’ demand deposit and term savings accounts against Anco’s indebtedness of $1,090,015.96, leaving due the bank a balance of $976,575.95. The bank exercised these setoffs without first foreclosing its real property security *996interest for the Wozabs’ guaranties. Anco filed a bankruptcy petition shortly thereafter.1
The bank and the Wozabs entered into discussions as to the Wozabs’ liability under their guaranties. The Wozabs contended that, under the then recently decided case of Bank of America v. Daily (1984) 152 Cal.App.3d 767 [199 Cal.Rptr. 557], the bank’s setoff constituted a waiver of its security interest in the Wozabs’ home. After considering the matter, the bank reconveyed the deed of trust to the Wozabs and filed the present action to enforce their guaranties, which became unsecured as a result of the bank’s reconveyance. The bank alleged breach of the guaranties and sought to recover the unpaid debt of approximately $976,000.
The bank and the Wozabs filed cross-motions for summary judgment. The Wozabs contended the bank’s setoff of their deposit accounts constituted not only a waiver of the security interest but also a waiver of the underlying debt (the personal guaranties). The trial court concluded the Wozabs were correct under Bank of America v. Daily, supra, 152 Cal.App.3d 767, and granted their motion for summary judgment. The trial court, however, expressed its strong disagreement with Daily, noting that it allowed the Wozabs to avoid paying a debt of almost $1 million. The court recommended that the bank appeal.
The bank did so, and the Court of Appeal affirmed. We granted the bank’s petition for review.
Discussion
1. Code of Civil Procedure section 726
The threshold question is whether the bank’s setoff of the Wozabs’ accounts was improper under Code of Civil Procedure section 726.2 If the bank’s setoff did not violate section 726, the setoff does not preclude the bank’s present suit to recover for breach of the guaranties. If, however, the setoff violated section 726, we must determine the setoff’s effect, if any, on the bank’s right to recover.3
Section 726, subdivision (a) states in relevant part, “There can be but one form of action for the recovery of any debt or the *997enforcement of any right secured by mortgage upon real property or an estate for years therein, which action shall be in accordance with the provisions of this chapter . . . .”4 This provision was first enacted in substantially similar form more than a century ago, and its general operation has long been clear.5 A secured creditor can bring only one lawsuit to enforce its security interest and collect its debt. Moreover, section 726(a) is part of a broader statutory scheme designed to protect debtors. “Under California law ‘the creditor must rely upon his security before enforcing the debt.’ . . . However, since under section 726 ‘[t]here can be but one form of action for the recovery of any debt’ secured by a mortgage or deed of trust on real property, where the creditor sues on the obligation and seeks a personal money judgment against the debtor without seeking therein foreclosure of such mortgage or deed of trust, he makes an election of remedies, electing the single remedy of a personal action, and thereby waives his right to foreclose on the security or to sell the security under a power of sale . . . . [fl] [Sjection 726 is susceptible of a dual application—it may be interposed by the debtor as an affirmative defense or it may become operative as a sanction. If the debtor successfully raises the section as an affirmative defense, the creditor will be forced to exhaust the security before he may obtain a money judgment against the debtor for any deficiency .... If the debtor does not raise the section as an affirmative defense, he may still invoke it as a sanction against the creditor on the basis that the latter by not foreclosing on the security in the action brought to enforce the debt, has made an election of remedies and waived the security.” (Walker v. Community Bank, supra, 10 Cal.3d 729, 733-734, quoting Roseleaf Corp. v. Chierighino (1963) 59 Cal.2d 35, 38-39 [27 Cal.Rptr. 873, 378 P.2d 97] [citations omitted]; see generally Comment, What is an Action for Purposes of Cal. Civil Procedure Code Section 726? *998(1988) 25 San Diego L.Rev. 1093, 1099-1101; 3 Witkin, Summary of Cal. Law (9th ed. 1987) Security Transactions in Real Property, § 119, pp. 620-621; 4 Miller & Starr, Current Law of Cal. Real Estate (2d ed. 1989) § 9:104, pp. 342-344.) With this understanding of how section 726 operates, we turn to the question of whether the bank’s setoff violated either the one-action or security-first rules that arise from section 726 and related statutes.
A. Definition of “action ”
Whether the bank’s set off was an “action” is answered by section 22, which states, “An action is an ordinary proceeding in a court of justice by which one party prosecutes another for the declaration, enforcement, or protection of a right, the redress or prevention of a wrong, or the punishment of a public offense.” (Italics added.) “ ‘When a statute prescribes the meaning to be given to particular terms used by it, that meaning is generally binding on the courts.’ ” (Great Lakes Properties, Inc. v. City of El Segundo (1977) 19 Cal.3d 152, 156 [137 Cal.Rptr. 154, 561 P.2d 244], quoting People v. Western Air Lines, Inc. (1954) 42 Cal.2d 621, 638 [268 P.2d 723].)
The bank’s setoff was not a “proceeding in a court of justice.” No court had anything to do with the setoff. It was therefore not an action within the meaning of section 22. The statute’s plain language permits no other reasonable conclusion. “It is axiomatic that in the interpretation of a statute where the language is clear, its plain meaning should be followed.” (Great Lakes Properties, Inc. v. City of El Segundo, supra, 19 Cal.3d 152, 155.) To construe section 22 to include the bank’s nonjudicial setoff, we would have to insert into section 22 language not used by the Legislature. Doing so would violate the cardinal rule of statutory construction that courts must not add provisions to statutes. (People v. Campbell (1902) 138 Cal. 11, 15 [70 P. 918]; Ross v. City of Long Beach (1944) 24 Cal.2d 258, 260 [148 P.2d 649].) This rule has been codified in California as section 1858, which provides that a court must not “insert what has been omitted” from a statute.6
Despite the clear language of section 22, the. Wozabs contend a long line of decisions supports the view that the bank’s setoff was an action within the scope of section 726(a). The Wozabs are right for the wrong reason. The setoff was a violation of section 726 but was not an “action.” *999Prior decisions have invalidated bank setoffs, not because the setoffs were “actions,” but because the security had not first been foreclosed.
B. Security-first rule
Section 726 embodies more than the “one-action” rule. As explained above, section 726 and the statutory scheme of which it is a part require a secured creditor to proceed against the security before enforcing the underlying debt. (Walker v. Community Bank, supra, 10 Cal.3d 729, 733-734.) This rule is hornbook law in California and warrants no extended discussion.
We first addressed the effect of this rule on a bank setoff almost a century ago in McKean v. German-Am. Savings Bank (1897) 118 Cal. 334 [50 P. 656] (McKean), in which a depositor’s assignee sued a bank to recover the amount of the bank’s setoff. As a defense, the bank contended the depositor’s debt was due at the time of the setoff, that the setoff was against this indebtedness, and that the setoff was before the assignment. The plaintiffassignee contended section 726 precluded this defense—that the bank should have foreclosed its security interest before taking the setoff. The court agreed. It reasoned that, because the security-first rule prohibited a bank from bringing a judicial action before foreclosing the security, the rule must equally prohibit a bank’s extrajudicial appropriation of the debtor’s assets before foreclosure. {Id., at pp. 340-341.)
Subsequent decisions without exception have followed McKean in construing bank setoffs to be subject to section 726. (Gnarini v. Swiss American Bank (1912) 162 Cal. 181, 184 [121 P. 726]; First Nat. Bank of Corona v. Coplen (1919) 39 Cal.App. 619, 620 [179 P. 708]; Woodruff v. California Republic Bank (1977) 75 Cal.App.3d 108, 110 [141 Cal.Rptr. 915]; Bank of America v. Daily, supra, 152 Cal.App.3d 767, 771.)
The bank contends we should overrule McKean, supra, 118 Cal. 334, and its progeny. The bank relies primarily on section 22’s provision that an “action” is a judicial action. As explained above, however, the bank’s reliance on section 22 is unavailing. We agree that an extrajudicial setoff is not an action, (pp. 998-999, ante.) The rationale of McKean is that a setoff violates the security-first rule of section 726. That rationale remains valid.7
*1000Moreover, even if we had some doubt as to McKean, supra, 118 Cal. 334—and we do not have any—we would decline the bank’s invitation to overrule that decision. The McKean rule has been the law for almost a century. The principle of stare decisis weighs heavily against a departure from such precedent. (Gardiner v. Royer (1914) 167 Cal. 238, 242 [139 P. 75] [refusing to overrule 20-year-old decision].) Just as important, the McKean rule is a rule of property that affects both a debtor’s bank deposits and the creditor bank’s security interest in real property. Perhaps more than in any other situation, courts are inclined to follow precedent when property rights have been founded and vested in accord with an existing rule. (Sacramento Bank v. Alcorn (1898) 121 Cal. 379 [53 P. 813].) At the time the Wozabs deposited their funds with the bank, they could rest assured the law prohibited a setoff of those funds against their secured debt to the bank. When asked to change a rule of property, we have made clear that even if “we might now be convinced that the rule was erroneous, it should not be disturbed.” (Id., at p. 382.)
We also note the record before us does not indicate that the prohibition of bank setoff against a secured debt has caused significant problems for the banking industry. If the courts’ construction of section 726 has been incorrect or unworkable, the banking industry has had ample opportunity (almost 100 years) to seek an amendment of the statute by the Legislature. There is no indication, however, the industry has done so or that the Legislature has reconsidered the effect of a bank setoff on a secured debt.
We reaffirm the long-standing rule that under section 726(a) a bank is not allowed to take a unilateral setoff of funds in a depositor’s demand account against a debt secured by the depositor’s interest in real property.
2. Effect of improper setoff
The more important question in this case is the effect of an improper setoff under section 726 on the underlying debt and security interest. The Wozabs contend the bank lost both its security interest and its right to recover the debt. The bank contends this drastic result is unwarranted and proposes three less severe remedies for an improper setoff: (1) In the bank’s view, the fairest remedy would be to restore the parties to their respective positions before the setoff by requiring the bank to return the offset funds with interest thereon to the depositor’s account. (2) In addition to return of *1001its funds with interest, the depositor would be entitled to compensatory damages actually incurred as a result of the setoff. (3) At most, the bank should lose its security interest in the real property collateral but retain its right to collect the underlying debt. The California Bankers Association, appearing as amicus curiae in support of the bank, also argues against the double sanction of loss of the security and debt and contends loss of the security is by itself sufficiently drastic to deter improper setoffs.
Before addressing the merits of these various approaches, we emphasize the narrowness of the issue before us. The improper setoff was brought to the bank’s attention by the debtors’ counsel, who contended it resulted in waiver of the security. The bank implicitly agreed (or at least conceded the point) and reconveyed the deed of trust to the debtors. A key fact for the present case that limits the scope of our decision is that the bank did not promptly return the amount of the setoff. We do not have before us a situation in which a bank has set off funds, perhaps inadvertently but in technical violation of section 726(a), and promptly thereafter returned them to the debtor’s account. We therefore need not, and do not, decide whether the bank in that situation could subsequently proceed against the security interest over the debtor’s objection. In this case the bank set off and retained the funds.8 We do not have before us either an inadvertent setoff or one of negligible duration.
Furthermore, the bank’s voluntary reconveyance of the trust deed to the debtors eliminates as a practical matter the issue of whether the improper setoff in this case should be sanctioned with an involuntary loss of the security interest. This question was effectively mooted by the reconveyance. In light of the importance of the issue for future transactions, however, we think it important to note that the bank’s voluntary reconveyance was an accurate reflection (and perhaps implicit acknowledgement by the bank) of the long-established rule as to the effect of an improper setoff. When a secured creditor violates section 726(a) by obtaining judgment on the debt before foreclosing upon the security, he is deemed to have waived the security, (pp. 997-998, ante; Walker v. Community Bank, supra, 10 Cal.3d 729, 733-734.) By parity of reasoning, a creditor bank that violates section *1002726(a) by taking an improper extrajudicial setoff must be held to have waived the bank’s security interest in its depositor’s real property. (Bank of America v. Daily, supra, 152 Cal.App.3d 767, 772.)
As noted above, the bank contends this result is unduly severe. The bank argues that a fairer remedy for an improper setoff would be for a court to require the bank to restore the setoff funds to its depositor’s account with interest and to award compensatory damages actually incurred by the depositor. We disagree because this alternative would deprive the depositor of the full measure of protection contemplated under section 726(a). One of the primary purposes of the one-action rule is to protect the debtor from having to defend against a multiplicity of actions. Under the bank’s view, the debtor subjected to an improper setoff would be saddled with the burden of having to commence a court action to recover the setoff and his other damages. After the debtor prevailed in that action, however, the bank could then judicially foreclose on the security and obtain a deficiency judgment if the security were insufficient to pay the debt. The obvious problem with this result is that the debtor would have been subjected to a multiplicity of actions; bringing one to recover the setoff and defending another by the creditor.
The bank’s suggested remedy also ignores commercial reality. Unless the amount of setoff is quite substantial, the economics of modern litigation are such that the depositor will be unable to find counsel willing to commence and maintain a lawsuit to recover the setoff. This is especially egregious in the case of a bank setoff because the debtor’s bank deposits—presumably his most liquid asset that he could use to obtain legal counsel—will have been placed beyond his reach by the bank itself. The debtor will also have suffered the dual burdens of having incurred substantial, and likely unrecoverable, legal fees and of having been required to suffer the often protracted delays of litigation just to recover funds that never should have been taken from him in the first instance. In short, requiring a depositor to seek affirmative relief (return of the setoff and compensatory damages) would provide little, if any, practical incentive for a bank to comply with section 726(a).
The remaining issue before us is whether the bank’s improper setoff requires a forfeiture of the underlying debt. As we shall explain, the law does not require that draconian sanction. Until the present case, no court had held that an improper bank set off resulted in loss of the debt. The earliest cases arising from an improper setoff did not even reach the remedy issue. In McKean, supra, 118 Cal. 334, the seminal case, the plaintiff (an assignee of the depositor) sued to recover $400 that had been deposited with the bank. The bank defended on the ground that the deposit had been set off *1003against the depositor’s secured debt. The court held that the setoff was invalid and that the bank was obliged under section 726 to bring a foreclosure action against the debtor before seeking to recover on the debt itself. The depositor was not a party to the action, and the court did not hold the bank had lost either its security interest or the underlying debt. To the contrary, McKean, to the extent it provides any guidance for this case, suggests the bank did not lose its right to enforce the debt. The same result obtained in subsequent decisions. In Gnarini v. Swiss American Bank, supra, 162 Cal. 181, and Woodruff v. California Republic Bank, supra, 75 Cal.App.3d 108, the courts held the setoffs were ineffective but did not hold or even suggest the debts were unenforceable.
The remedy issue was first squarely addressed in Bank of America v. Daily, supra, 152 Cal.App.3d 767 (Daily). In Daily, a bank set off $10,412.50 from a debtor’s checking account as partial payment of a promissory note secured by the debtor’s real property. The bank then filed an action to foreclose on the secured property to recover the balance of the debt. Applying the rule of McKean, supra, 118 Cal. 334, and its progeny, the court held the setoff was a violation of section 726. The court then considered the question of the appropriate remedy for the violation.
As in the present case, the bank in Daily, supra, 152 Cal.App.3d 767, contended the proper remedy would be to return the parties to their respective positions before the setoff. The court rejected this argument and held the bank had waived its right to foreclose the security. That was the necessary and correct result under section 726(a). (P. 1002, ante.) The bank in Daily, however, was not seeking a judgment on the underlying debt, and the court did not have occasion to decide whether the bank was precluded from doing so. The Wozabs nevertheless rely heavily on Daily for their argument that the setoff waived the underlying debt. In reaching its conclusion as to the loss of security, the Daily court briefly quoted from a treatise: “ ‘The classic sanction against the creditor who fails to exhaust all his security for the same debt in a single action is harsh, yet it follows inescapably from the availability of but one action to the creditor—he waives the balance of the security and he waives any claim to the unpaid balance of the debt. ’ ” (152 Cal.App.3d at p. 772, italics added, quoting Hetland, Cal. Real Estate Secured Transactions (Cont.Ed.Bar. 1970) Antideficiency Legislation, § 6.18, p. 258.)
Daily, supra, 152 Cal.App.3d 767, does not support the Wozabs’ position. The cause of action in Daily was for foreclosure of the bank’s security interest. Unlike in the present case, the bank was not seeking to recover on the debt. The court’s brief quotation regarding the debt was clearly dictum. “ ‘It is the general rule that the language of an opinion must be *1004construed with reference to the facts presented by the case, and the positive authority of a decision is coextensive only with such facts.’” (Brown v. Kelly Broadcasting Co. (1989) 48 Cal.3d 711, 734-735 [257 Cal.Rptr. 708, 771 P.2d 406], quoting River Farms Co. v. Superior Court (1933) 131 Cal.App. 365, 369 [21 P.2d 643].) Daily did not decide whether an improper setoif requires forfeiture of the debt as well as the security interest.
We are therefore confronted with an issue of first impression: Does an improper bank setoff result in the forfeiture of the underlying debt? We conclude there is no forfeiture. When a secured creditor sues only on the underlying debt without seeking to foreclose the security, he is precluded by section 726(a) from proceeding against the security in a subsequent action. (Salter v. Ulrich (1943) 22 Cal.2d 263, 268 [138 P.2d 7, 146 A.L.R. 1344].) The creditor is deemed to have waived his security.9 The judgment on the debt, however, is unaffected by the creditor’s failure to comply with the chronology required by section 726. (22 Cal.2d at p. 268.) Similarly, if a creditor has multiple security interests for a debt and proceeds against less than all of them in a judicial foreclosure action, in which he obtains a deficiency judgment, he cannot thereafter seek to foreclose the excluded security. (Walker v. Community Bank, supra, 10 Cal.3d 729, 733-734.) In that situation, however, the creditor also has a judgment on the underlying debt.
In this case the bank’s setoff was not a judicial action, and the bank therefore did not obtain a judgment for the full amount of the debt (as in Salter v. Ulrich, supra, 22 Cal.2d 263) or for any deficiency after sale of the security (as in Walker v. Community Bank, supra, 10 Cal.3d 729). In both Salter and Walker the creditors failed to comply fully with section 726, but in both cases the creditors were allowed a judgment for the full amount of the debt. The only sanction was that the creditors lost their preferred position as secured creditors (in whole or in part) and were reduced to the status of unsecured creditors—a drastic sanction in the marketplace. (Bernhardt, Mortgages and Deeds of Trust (Cont.Ed.Bar 1989) 12 Real Prop. L. Rptr. 184, 186.) By parity of reasoning, the bank in this case also must be allowed to seek a judgment for the full balance of the debt.
The particular facts of this case also demonstrate that allowing the bank to recover the Wozabs’ debt is consistent with the purpose and operation of section 726. As we explained in Walker v. Community Bank, supra, 10 Cal.3d 729, the operation of section 726 is in large part within the control of the debtor. If a secured creditor brings an action on the debt before foreclos*1005ing the security, the debtor can interpose section 726 as an affirmative defense, thereby requiring the creditor to exhaust the security before he may obtain a money judgment against the debtor. If the debtor does not raise the statute as an affirmative defense, the creditor’s action on the debt is allowed to proceed to judgment. The creditor, however, is precluded from thereafter foreclosing on the security. He is deemed to have elected his remedy. (Id., at pp. 733-734; Roseleaf Corp. v. Chierighino, supra, 59 Cal.2d 35, 38-39.)
When the bank set off the Wozabs’ account, they were in the same functional position as a debtor defending a judicial action on the debt. They could have demanded that the bank proceed against the security before resorting to their personal assets, i.e., their bank deposits. Instead, they notified the bank that in their view the setoff had waived the security interest. The Wozabs then accepted the bank’s reconveyance to them of the deed of trust. (The record does not reflect that the Wozabs ever requested a refund of the setoff.) By doing so, they voluntarily relinquished the protection of the security-first rule. Put plainly, the bank erred in taking the setoff. For reasons unknown to us—personal, economic, or otherwise—the Wozabs seized the opportunity to reclaim their deed of trust, preventing the bank from first proceeding against the security as required by section 726. We find no merit in the Wozabs’ belated claim that the bank should have foreclosed before seeking a personal judgment. The Wozabs acquiesced in (indeed, demanded) the bank’s decision not to foreclose. This is consistent with the rule that a debtor can waive the protection of section 726 by failing to insist that the creditor first proceed against the security. (Salter v. Ulrich, supra, 22 Cal.2d at p. 268.) “Acquiescence in error takes away the right of objecting to it.” (Civ. Code, § 3516.) To allow the Wozabs now to claim they were deprived of the benefits of the rule would be to encourage gamesmanship—demanding reconveyance of the security and then demanding that the creditor resort to the security. The two demands are mutually inconsistent.
Allowing the bank to sue on the debt does not violate the two fundamental purposes of section 726: (1) preventing a multiplicity of lawsuits against the debtor, and (2) requiring exhaustion of the security before a resort to the debtor’s unencumbered assets. The present action is the only lawsuit against the Wozabs, and they freely chose not to have the bank foreclose upon the security interest.
Finally, the result advocated by the Wozabs—allowing them to evade their debt almost in its entirety—would be a gross injustice to the bank and a corresponding windfall to the Wozabs. (Mertens, California’s Foreclosure Statutes: Some Proposals For Reform (1986) 26 Santa Clara L.Rev. 533, 555 [noting unfairness of this result].) They voluntarily *1006executed their personal guaranties and the trust deed to further their substantial business interests. They promised to pay, if necessary, the money loaned to their business for their benefit. They induced the bank to rely on this promise by executing the deed of trust. The Wozabs got what they wanted, money for their business. They now want to deprive the bank, however, of its benefit of the bargain. They have their property free and clear of the security interest and thus far they have avoided the debt almost entirely—having paid only $2,804.82 and leaving unpaid a balance of $976,575.95. Such result would violate the notion of simple morality that “He who takes the benefit must take the burden.” (Civ. Code, § 3521.)
Moreover, the result advocated by the Wozabs is so harsh as to be punitive. It would constitute a penalty against the bank 300 times greater than the amount of the setoff. One commentator observed of this result, “To force a bank to forfeit nearly $1,000,000 because it mistakenly attempted to apply $3,000 in a deposit account to a secured debt is unreasonable. In fact it is downright silly.” (Munoz & Rabin, The Sequel to Bank of America v Daily: Security Pac. Nat’l Bank v Wozab (Cont.Ed.Bar 1989) 12 Real Prop. L. Rptr. 204, 210.) We agree.
The result we reach is also fair and workable in future cases. Because a debtor can object to an improper setoff and require the bank to return it and proceed first against the security interest, a bank cannot unilaterally waive its security interest by taking an improper setoff and then proceeding directly on the underlying debt. The debtor retains the right to require the bank to return the improper setoff and proceed against the security interest before the bank attempts to recover on the underlying debt. Of course, if the bank refused the debtor’s demand and retained the setoff funds, the security-first rule (pp. 1001-1002, ante) would preclude the bank from foreclosing the security interest or proceeding on the underlying debt. Conversely, if the bank complied with the debtor’s demand to return the funds and to proceed first against the security, the debtor could not thereafter assert that the bank had waived its security interest.
Disposition
The judgment of the Court of Appeal is reversed with directions to remand this action to the trial court for further proceedings in accord with this opinion. The bank is awarded its costs on appeal.
Lucas, C. J., Panelli, J., and Arabian, J., concurred.
Anco’s line of credit with the bank was not secured by real property, and the bank’s setoff against Anco’s deposit accounts is not at issue in this appeal.
All section references are to the Code of Civil Procedure unless otherwise indicated.
The Wozabs’ accounts were general deposit accounts. The bank’s setoff against those accounts was therefore an exercise of the bank’s equitable right of setoff rather than its statutory banker’s lien under Civil Code section 3054. (Kruger v. Wells Fargo Bank (1974) 11 Cal.3d 352, 357-358 [113 Cal.Rptr. 449, 521 P.2d 441, 65 A.L.R.3d 1266].)
For convenience we will hereinafter refer to section 726, subdivision (a) as section 726(a). The remainder of section 726(a) states, “ . . .In the action the court may, by its judgment, direct the sale of the encumbered real property or estate for years therein (or so much of the real property or estate for years as may be necessary), and the application of the proceeds of the sale to the payment of costs of court, the expenses of levy and sale, and the amount due plaintiff, including, where the mortgage provides for the payment of attorney’s fees, the sum for attorney’s fees as the court shall find reasonable, not exceeding the amount named in the mortgage.”
Although section 726(a) refers only to a “mortgage,” the statute applies equally to a deed of trust. (Walker v. Community Bank (1974) 10 Cal.3d 729, 733, fn. 1 [111 Cal.Rptr. 897, 518 P.2d 329]; Bank of Italy v. Bentley (1933) 217 Cal. 644, 653 [20 P.2d 940].)
The one-action rule was first adopted in California in 1860 as part of section 246 of the Civil Practice Act. (Stats. 1860, ch. 314, § 23, pp. 303-304.) The rule was incorporated into the Code of Civil Procedure as section 726 in 1872. (Ann. Code Civ. Proc., § 726 (1st ed. 1872, Raymond & Burch) pp. 195-196.) As enacted in 1872, section 726 referred to “one action” and was amended in 1933 to refer to “one form of action.” (Stats. 1933, ch. 793, § 1, p. 2118.) The change has not been considered significant, and the statute is often still referred to as the one-action rule. (Bernhardt, Cal. Mortgage and Deed of Trust Practice (Cont.Ed.Bar 1979) § 4.3, pp. 140-141.)
Section 1858 states: “In the construction of a statute or instrument, the office of the judge is simply to ascertain and declare what is in terms or in substance contained therein, not to insert what has been omitted, or to omit what has been inserted; and where there are several provisions or particulars, such a construction is, if possible, to be adopted as will give effect to all.”
In Bank of America v. Daily, supra, 152 Cal.App.3d 767, 771, the court construed McKean, supra, 118 Cal. 334, as having held that a setoff is an “action” within the meaning of section 22. As explained above, that was not the basis of the McKean court’s decision. Moreover, in McKean the bank was asserting its prior setoff as a defense in a lawsuit by the *1000depositor’s assignee. The court correctly explained that, in that context, the setoff was an “action.” The McKean court did not hold that an extrajudicial setoff was an action. The court’s holding was more narrow—only that the setoff could not be raised by the bank in a court of law. We disapprove of Bank of America v. Daily, supra, 152 Cal.App.3d 767, to the extent it construed a setoff as itself being an action.
In light of our holding that a bank setoff is improper, we can reasonably expect that only in a rare, future case would a bank nonetheless intentionally set off and retain funds over a depositor’s protest. The more likely circumstance would be a setoff by an uninformed or misinformed bank employee. If the bank promptly returned the funds to the depositor’s account (either unilaterally or at the depositor’s request), to impose on the bank either a loss of the security or underlying debt might be excessive. A sufficient remedy might be to hold the bank responsible for any compensatory damages suffered by the depositor. As noted above, however, this is not such a case, and we do not decide what the appropriate remedy, if any, should be in that circumstance if the depositor were to assert a waiver by the bank of its security interest.
The debtor, of course, can raise the security as an affirmative defense in the action on the debt. If the debtor does so, the creditor will be required to proceed first against the security. (Pp. 997-998, ante.)