Opinion
RICHARDSON, J.We examine and resolve an apparent conflict between two subdivisions of Code of Civil Procedure section 581. (All further statutory references are to that code unless otherwise cited.) Subdivision 1 gives a plaintiff a right to dismiss his action without prejudice “at any time before the actual commencement of trial.” Subdivision 3, on the other hand, affords a defendant a right to obtain dismissal of such action with prejudice after the trial court has sustained, with leave to amend, defendant’s general demurrer, and plaintiff has failed to so amend. We will conclude that in such a conflict, a defendant’s right to a dismissal with prejudice prevails.
On August 4, 1978, defendants’ general demurrer to plaintiff’s second amended complaint was sustained with leave to amend within 30 days. The time for such amendment subsequently was extended to September 26. Plaintiff sought no further extensions and did not amend his complaint.
On October 5, defendants filed and served upon plaintiff by mail a notice of a motion to be heard October 20 for a dismissal with prejudice of plaintiff’s action, pursuant to Code of Civil Procedure section 581, subdivision 3.
*784On October 6, plaintiff filed a request for dismissal of his action without prejudice, pursuant to section 581, subdivision 1. The clerk of the court entered a dismissal without prejudice in accordance with the statute; and plaintiff gave to defendants written notice thereof.
On October 20, after hearing, the court granted defendants’ previously noticed motion for dismissal with prejudice of plaintiff’s action, observing that plaintiff’s previous request for dismissal without prejudice was not in the court’s file.
On November 9, however, the court reversed itself and granted plaintiff’s motion to set aside its order of dismissal with prejudice on the ground that plaintiff’s voluntary dismissal of October 6 had terminated the court’s jurisdiction over the matter. It is from this ruling that defendants appeal.
We examine more closely the applicable statute. In relevant part, section 581 provides: “An action may be dismissed in the following cases:
“1. By plaintiff, by written request to the clerk, . . at any time before the actual commencement of trial, ... A trial shall be deemed to be actually commenced at the beginning of the opening statement of the plaintiff or his counsel, and if there shall be no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence.
“3. By the court, . . . when, after a demurrer to the complaint has been sustained with leave to amend, the plaintiff fails to amend it within the time allowed by the court, and either party moves for such dismissal.”
Apart from certain omitted and irrelevant statutory exceptions, a plaintiff’s right to a voluntary dismissal pursuant to subdivision 1 appears to be absolute. (See 4 Witkin, Cal. Procedure (2d ed. 1971) Proceedings Without Trial, § 44, p. 2709.) Upon the proper exercise of that right, a trial court would thereafter lack jurisdiction to enter further orders in the dismissed action. The implication of a subdivision 1 dismissal is that it is generally “without prejudice” to a plaintiff’s filing of a new action on the same allegations if it is done within the period of the appropriate statute of limitations. (Id., at § 55, p. 2720.) Plaintiff *785denominated his request here as “without prejudice,” and the dismissal as entered so indicated.
On the other hand, the power of a court to dismiss an action upon motion of either party under the circumstances set forth in subdivision 3 seems equally clear. (4 Witkin, supra, at § 120, p. 2786.) As with subdivision 1 dismissals, the statutory language is not specific but it is generally accepted that the movant is entitled to an appealable judgment of dismissal “with prejudice” (ibid.), as defendants requested in this case.
What are the time limits within which a subdivision 1 voluntary dismissal may be effected? In construing a previous version of section 581, subdivision 1, which afforded a plaintiff a right to dismiss his action voluntarily “at any time before trial,” we established many years ago that such right was ended when a trial court order sustained a defendant’s general demurrer without leave to amend. (Goldtree v. Spreckels (1902) 135 Cal. 666 [67 P. 1091].) We reasoned that the use of the term “trial” in the statute “cannot be restricted in its meaning to trials of the merits after answer, for there may be such a trial on a general demurrer to the complaint as will effectually dispose of the case where the plaintiff has properly alleged all the facts which constitute his cause of action. If the demurrer is sustained, he stands on his pleading and submits to judgment on the demurrer, and, if not satisfied, has his remedy by appeal. In such a case, we think, there would be a trial within the meaning of the code, ...” (Id., at pp. 672-673.)
With reference to cases, such as the one before us, in which leave to amend is afforded but not exercised, we further noted: “‘When a general demurrer to a petition is sustained, and the plaintiff declines to amend, he practically confesses that he has alleged in his pleading every fact he is prepared to prove in support of his action. Therefore, in such a case, nothing remains to be done except to render judgment for the defendant. Since the defendant by his demurrer has admitted all the facts of the plaintiff’s case, we see no reason why the judgment should not be regarded as a conclusive determination of the litigation on its merits.’” (Goldtree v. Spreckels, supra, 135 Cal. at p. 672.) We held that the matter having been submitted to the court, a plaintiff no longer had the right to dismiss without prejudice. “‘If he could do so, litigation would become interminable, because a party who was led to suppose a decision would be adverse to him could prevent such decision and begin anew, thus subjecting the defendant to annoying and continuous litiga*786tion.’” (Id., at p. 671.) An important additional interest has also been identified. “But the injustice to the defendant is not the greatest evil of such a practice; the wasting of the time and money of the people in a fruitless proceeding in the courts is something far more serious.” (Casner v. Daily News Company, Ltd. (1940) 16 Cal.2d 410, 421 [106 P.2d 201] (dis. opn. of Edmonds, J.).)
Subsequent to our decision in Goldtree, subdivision 1 was amended to its current form, now affording plaintiff a right to dismiss “at any time before the actual commencement of trial,” rather than “at any time before trial,” as provided previously. The amendment also listed several events which would be “deemed” to constitute the “actual commencement of trial.” Plaintiff argues that this amendment, together with its explicit definition of the “commencement of trial,” changed the rule of Goldtree which had prevented voluntary dismissal by a plaintiff after the sustaining of a demurrer. It is contended that the modification of the statute created a new and exclusive test, preserving the right of voluntary dismissal until the occurrence of one of the specific acts deemed by subdivision 1 to constitute “the actual commencement of trial.” In support of his contention (and of the trial court’s ultimate ruling), plaintiff relies on United Shippers, Inc. v. Superior Court (1980) 104 Cal.App.3d 359 [162 Cal.Rptr. 871], and Parenti v. Lifeline Blood Bank (1975) 49 Cal.App.3d 331 [122 Cal.Rptr. 709]. While the holding in neither case directly establishes plaintiff’s position, there is language in each case which supports him.
In United Shippers, defendant’s demurrer had been argued and submitted, but was undecided by the court, when plaintiff successfully requested of the clerk of the court a voluntary dismissal of his action without prejudice. Subsequently, the trial court sustained the demurrer (without leave to amend) and dismissed the action. In reversing the trial court the Court of Appeal asserted that a plaintiff has an absolute right to dismiss his action pursuant to section 581, subdivision 1, even “after a demurrer to his complaint has been submitted to the court for decision....” (United Shippers, Inc. v. Superior Court, supra, 104 Cal.App.3d at p. 361.) Accordingly, it held that the trial court lacked jurisdiction to proceed once plaintiff had filed his dismissal. (Id., at p. 363.)
United Shippers is distinguishable, of course, in that the trial court there had not yet ruled on the merits of the demurrer when plaintiff voluntarily dismissed its action. In such a case, the rationale of Gold-*787tree favoring early termination of litigation arguably is of less force in preventing voluntary dismissal.
In Parenti v. Lifeline Blood Bank, supra, 49 Cal.App.3d 331, defendant’s general demurrer was sustained. At plaintiff’s request, the order was made without leave to amend, presumably to expedite appeal. Several months later, plaintiff did file a notice of appeal from the order sustaining defendant’s demurrer. On the same day, however, she filed a request for voluntary dismissal pursuant to section 581, subdivision 1. Holding that no appealable judgment had been entered on the order sustaining the demurrer, and that plaintiff obviously could not appeal her own voluntary dismissal, the appellate court dismissed the appeal. (Id., at p. 333.)
In dictum, however, the Parenti court construed broadly the same language of subdivision 1 relied upon in United Shippers, concluding that plaintiff’s voluntary dismissal, properly requested before “the actual commencement of trial,” deprived the trial court of jurisdiction to act further in the matter. Accordingly, it noted that even if plaintiff were then to seek to have the trial court enter an appealable judgment of dismissal on its order sustaining defendant’s demurrer, it would fail because that court had “nothing before it on which to act.” (Id., at p. 335.)
The conclusion of United Shippers and Parenti that the amendment to section 581, subdivision 1, undermined the rationale of Goldtree is incorrect. Cases decided after the 1947 amendment, including our own, have relied upon Goldtree’s definition of a “trial” as including an order sustaining a demurrer. (See, e.g., Berri v. Superior Court (1955) 43 Cal.2d 856 [279 P.2d 8]; London v. Morrison (1950) 99 Cal.App.2d 876, 879 [222 P.2d 941]; 4 Witkin, supra, at § 51, p. 2716.) In Berri, for example, decided eight years after the amendment, we again held that the sustaining of a demurrer without leave to amend was a “trial” preventing the dismissal of the action pursuant to section 583 for plaintiff’s failure to bring the action “to trial” within five years after it was filed. Continuing to rely on Goldtree we observed “generally in defining a trial ... it is the determination of an issue of law or fact; a demurrer of course calls for the determination of an issue of law only. [Citations.]” (Berri, supra, 43 Cal.2d at p. 859.) Accordingly, we are unable to agree with plaintiff’s contention that the 1947 amendment erased or diluted the Goldtree rationale. It is reasonable to conclude that the 1947 amendment to section 581, subdivision 1, did not address the issue *788before us, namely, when does the trial of an issue of law commence? Nor may the section be read, at this late date, to overrule the Goldtree reasoning by implication.
Moreover, plaintiffs interpretation of the amendment to subdivision 1, in our view, would appear to subvert its intended effect. The amendment was urged by the Committee on Administration of Justice of the State Bar to eliminate the practice of a plaintiffs voluntary dismissal of his action after the case had been called for trial or, even more seriously, after the parties and the court had been engaged substantially in trial on the merits. (See Rep. of Com. on Admin. of Justice, 1945-1946 (1946) 21 State Bar J. 166, 197.) Viewed as a response to such concerns, the amendment clearly would limit that right of voluntary dismissal to the point of the “commencement” of trial. Construing the amendment as extending the opportunities for voluntary dismissal beyond those recognized by Goldtree, on the other hand, as plaintiff would have us do, clearly runs counter to the direction of the legislative purpose.
Other considerations also lead us to the conclusion that defendants’ position is the stronger here. It is fundamental that legislation should be construed so as to harmonize its various elements without doing violence to its language or spirit. Wherever possible, potentially conflicting provisions should be reconciled in order to carry out the overriding legislative purpose as gleaned from a reading of the entire act. (See People ex rel. Younger v. Superior Court (1976) 16 Cal.3d 30, 40 [127 Cal.Rptr. 122, 544 P.2d 1322].) A construction which makes sense of an apparent inconsistency is to be preferred to one which renders statutory language useless or meaningless. (See Estate of McDill (1975) 14 Cal.3d 831, 837 [122 Cal.Rptr. 754, 537 P.2d 874].) Permitting a plaintiff to exercise an absolute right to dismiss his action without prejudice to recommencing suit based upon the same allegations, even after the trial court has ruled definitively and adversely on the sufficiency of those allegations, makes neither good sense nor good law.
The present case is illustrative. Plaintiff apparently was unable to amend the allegations of his complaint to satisfy the court that a cause of action was stated. He was given several opportunities to do so. To accept his present argument, and assuming the statute of limitations permitted, would allow him to reassert the same allegations in still another complaint, seeking a more favorable ruling from another court, *789rather than to proceed in a more appropriate, expeditious and final, course to appeal on the legal sufficiency of those allegations.
The obvious consequence of such a statutory construction would be to prolong, rather than to terminate, lawsuits. It would not serve the orderly and timely disposition of civil litigation. No good reason appears why encouragement should be given to such tactics, the effect of which is to expose defendants to duplicative “annoying and continuous litigation,” to burden our trial court with “fruitless” proceedings, and to delay the ultimate resolution of the validity of the plaintiff’s pleading. (See Goldtree, supra, 135 Cal. at p. 671; Casner, supra, 16 Cal.2d at p. 421 (dis. opn.).) Any language to the contrary in United Shippers and Parenti, both supra, is disapproved.
Our interpretation of section 581 does not deny a plaintiff his day in court. It simply requires that he frame his allegations in order to state a cause of action; and if a plaintiff is unable to do so after an adequate and reasonable opportunity is afforded, he must proceed to a review of such legal determination by appeal, rather than seek another trial forum in which to reassert the same claims.
We emphasize that the res judicata effect of a judgment of dismissal pursuant to subdivision 3 after the sustaining of a demurrer is of limited scope. Referring to subdivision 3, we have previously cautioned that, “It is a judgment on the merits to the extent that it adjudicates that the facts alleged do not constitute a cause of action .... If, on the other hand, new or additional facts are alleged that cure the defects in the original pleading, it is settled that the former judgment is not a bar to the subsequent action whether or not plaintiff had an opportunity to amend his complaint.” (Keidatz v. Albany (1952) 39 Cal.2d 826, 828 [249 P.2d 264], and cases there cited.)
We conclude, therefore, that once a general demurrer is sustained with leave to amend and plaintiff does not so amend within the time authorized by the court or otherwise extended by stipulation or appropriate order, he can no longer voluntarily dismiss his action pursuant to section 581, subdivision 1, even if the trial court has yet to enter a judgment of dismissal on the sustained demurrer. (Anticipating another possible source of procedural confusion (see Woods, To Dismiss or Not to Dismiss: That is the Question (Cont.Ed.Bar Oct. 1980) 2 Civ. Litigation Rptr. p. 109), we note that such right of voluntary dismissal, *790which is not barred until expiration of plaintiffs time to amend after the sustaining of the demurrer, would also not be impaired prior to a decision sustaining the demurrer.)
The matter is remanded to the trial court with directions to vacate the order appealed from and to reinstate its previous judgment of dismissal with prejudice pursuant to subdivision 3 of section 581.
Tobriner, J., Mosk, J., Newman, J., and Rattigan, J.,* concurred.
Assigned by the Chairperson of the Judicial Council.