
582 N.W.2d 312 (1998)
255 Neb. 62
Samuel WELSCH, Appellant,
v.
Tom GRAVES and New Hope Addictions Center, Appellees.
No. S-97-447.
Supreme Court of Nebraska.
July 17, 1998.
*314 Shelley A. Horak, Sioux City LA, for appellant.
Michael W. Ellwanger, of Rawlings, Nieland, Probasco, Killinger, Ellwanger, Jacobs & Mohrhauser, Sioux City IA, for appellees.
WHITE, C.J., CAPORALE, WRIGHT, CONNOLLY, GERRARD, STEPHAN, and McCORMACK, JJ.
STEPHAN, Justice.
Samuel Welsch appeals from an order entering summary judgment in favor of Tom Graves and New Hope Alcoholism and Addiction Center (New Hope) on the grounds that his personal injury action against them was not commenced within the 2-year limitations period for professional negligence actions set forth in Neb.Rev.Stat. § 25-222 (Reissue 1995). We conclude that the statute of limitations defense was waived because it was not asserted in the pleadings and, therefore, reverse the judgment of the district court and remand the cause for further proceedings.

FACTUAL BACKGROUND
Graves is a substance abuse counselor certified by the State of Nebraska and employed by New Hope. Graves provided counseling to Welsch from May 1991 until approximately September 15, 1993. This action was commenced on October 12, 1995. In his operative amended petition filed on February 6, 1996, Welsch alleged that Graves, as an employee of New Hope, "did not exercise the degree of skill, care, and knowledge ordinarily exercised or possessed by counselors ... in Dakota County Nebraska" and was negligent in failing to properly assess and treat Welsch's condition, in providing treatment to Welsch's entire family despite a conflict of interest, in diagnosing and treating Welsch when Graves was unqualified to do so, and in other particulars.
Graves and New Hope did not demur to Welsch's petition nor did they assert a statute of limitations defense in their answer filed on February 20, 1996. This defense was alleged for the first time in a motion for summary judgment filed on November 27, 1996. Although Welsch argued that the failure to raise the defense by demurrer or answer resulted in its waiver, the district court found that it was properly raised by the motion for summary judgment. The court further found that Graves was a professional and that Welsch's action was barred by § 25-222 because it was filed more than 2 years after Graves last provided services to Welsch. Consequently, the district court sustained the motion for summary judgment and Welsch perfected this appeal. Pursuant to our authority to regulate the dockets of this court and the Nebraska Court of Appeals, we removed the case to our docket on our own motion.

ASSIGNMENT OF ERROR
Restated, Welsch asserts in his assignments of error that the district court erred in sustaining Graves and New Hope's motion for summary judgment because (1) the statute *315 of limitations defense had been waived and (2) Graves was not a professional for purposes of § 25-222.

STANDARD OF REVIEW
In reviewing a summary judgment, an appellate court views the evidence in a light most favorable to the party against whom the judgment is granted and gives such party the benefit of all reasonable inferences deducible from the evidence. Burnett v. Peters, 254 Neb. 74, 574 N.W.2d 487 (1998); Chalupa v. Chalupa, 254 Neb. 59, 574 N.W.2d 509 (1998); Bargmann v. Soli Oil Co., 253 Neb. 1018, 574 N.W.2d 478 (1998).

ANALYSIS
In asserting that Graves and New Hope waived their statute of limitations defense, Welsch relies on our decision in L.J. Vontz Constr. Co. v. Department of Roads, 232 Neb. 241, 244, 440 N.W.2d 664, 665-66 (1989), where we held that "[s]ince a defendant cannot raise the statute of limitations for the first time on appeal, a defendant waives the statute of limitations by failure to raise the issue in a demurrer or the defendant's answer." While L.J. Vontz Constr. Co. involved an attempt to raise the statute of limitations for the first time on appeal, a circumstance not present here, our cases indicate that a defendant must raise the statute of limitations either by demurrer or in his answer to prevent a finding that the defendant has waived the defense. When it is apparent from the face of the petition that the action is barred by a statute of limitations, the petition fails to state a cause of action and is subject to a general demurrer. Giese v. Stice, 252 Neb. 913, 567 N.W.2d 156 (1997); L.J. Vontz Constr. Co. v. Department of Roads, supra. On the other hand, when it is not apparent from the face of the petition that the action is barred by the statute of limitations, the affirmative defense of the statute of limitations must be raised in the answer. Buffalo County v. Kizzier, 250 Neb. 180, 548 N.W.2d 757 (1996); Rosberg v. Lingenfelter, 246 Neb. 85, 516 N.W.2d 625 (1994); L.J. Vontz Constr. Co. v. Department of Roads, supra. We stated in Vielehr v. Malone, 158 Neb. 436, 439, 63 N.W.2d 497, 501 (1954):
The benefit of the statute of limitations is personal and, like any other personal privilege, may be waived and will be unless pleaded. [Citations omitted.] It must be pleaded either by answer or demurrer or it will be considered as waived. [Citations omitted.]
....
... "[T]he statute of limitations does not operate by its own force as a bar but operates rather as a defense to be pleaded by the party relying upon it."
We note that in its order granting the motion for summary judgment, the district court also granted a "Motion to Amend Answer" which was apparently filed by Graves and New Hope but does not appear in the transcript filed in this appeal. However, as reflected in the record and confirmed by counsel during oral argument, no amended answer asserting a statute of limitations defense was ever filed.
The pleadings in an action are "the written statements by the parties of the facts constituting their respective claims and defenses." Neb.Rev.Stat. § 25-801 (Reissue 1995). The purpose of pleadings is to frame the issues upon which a cause is to be tried, and the issues in a given case will be limited to those which are pleaded. Buffalo County v. Kizzier, supra. A pleading serves to eliminate from consideration those contentions which have no legal significance and to guide the parties and the court in the conduct of cases. Cotton v. Ostroski 250 Neb. 911, 554 N.W.2d 130 (1996).
The pleadings likewise frame the issues to be considered on a motion for summary judgment. Neb.Rev.Stat. § 25-1332 (Reissue 1995) provides in part that summary judgment shall be rendered pursuant to motion "if the pleadings, depositions, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law." (Emphasis supplied.) We have stated that a court may not enter summary judgment on an issue not presented by *316 the pleadings. Slagle v. J.P. Theisen & Sons, 251 Neb. 904, 560 N.W.2d 758 (1997); Frerichs v. Nebraska Harvestore Sys., 226 Neb. 220, 410 N.W.2d 487 (1987). In Slagle, we cited this rule and concluded that the defendants' failure to raise the defense of contributory negligence in their motion for summary judgment precluded the trial court from ruling on the issue. We stated, "[a]bsent such a reference in these pleadings, the trial court could not and should not have ruled on this issue." (Emphasis supplied.) Slagle v. J.P. Theisen & Sons, 251 Neb. at 909, 560 N.W.2d at 762. This characterization of a motion for summary judgment as a "pleading" was improper. Our code of civil procedure provides that "[t]he only pleadings allowed are (1) the petition by the plaintiff; (2) the answer or demurrer by the defendant; (3) the demurrer or reply by the plaintiff; and (4) the demurrer to the reply by the defendant." Neb.Rev.Stat. § 25-803 (Reissue 1995). Therefore, despite language in Slagle suggesting otherwise, a motion for summary judgment is not a pleading and, by itself, is insufficient to raise an affirmative defense such as the statute of limitations.
Graves and New Hope argue that they were not required to plead the statute of limitations defense in their answer because it was apparent from the face of the petition. As noted above, we stated in L.J. Vontz Constr. Co. v. Department of Roads, 232 Neb. 241, 440 N.W.2d 664 (1989), that when it is apparent from the face of the petition that an action is barred by the statute of limitations, the petition fails to state a cause of action and is subject to a general demurrer. In Johnson v. Hays, 193 Neb. 54, 225 N.W.2d 397 (1975), a case which did not involve a limitations issue, we stated that a petition may be attacked at any stage of the proceedings on the ground that it fails to state a cause of action. Reading these cases together, we stated in Plock v. Crossroads Joint Venture, 239 Neb. 211, 227, 475 N.W.2d 105, 117 (1991): "[I]t would appear that a petition which on its face shows that the action is barred by the statute of limitations may be attacked even at the appeal stage." This statement constituted dicta, since the issue before us in Plock was the necessity of pleading a defense based upon the exclusivity of the Nebraska Workers' Compensation Act. Although the statement was subsequently cited in Upah v. Ancona Bros. Co., 246 Neb. 585, 521 N.W.2d 895 (1994), that case presented no issue of waiver because the defendants alleged in their answer that the plaintiff's claims were barred by the statute of limitations and a separate trial was held on that issue.
We have recently reaffirmed the general rule that a "failure to demur does not waive the objection that a cause of action has not been stated and that such objection can be raised at any time." Hynes v. Hogan, 251 Neb. 404, 408, 558 N.W.2d 35, 39 (1997). However, this rule does not apply where the facially apparent defect which prevents the petition from stating a cause of action is an affirmative defense, such as the statute of limitations, which can be waived if not asserted by answer. In that circumstance, the waiver resulting from a failure to plead the defense cures the defect in the petition.
To the extent that the dicta in Plock which is cited in Upah suggests there are any circumstances in which a statute of limitations defense can be asserted when it has not been raised either by demurrer or answer, it is specifically disapproved. We reaffirm the long-established rule that a statute of limitations defense is waived unless asserted by demurrer or answer. Applying this rule to the record before us here, we conclude that the district court erred as a matter of law in finding that Welsch's claim was barred by § 25-222 because this defense was not presented by pleadings filed prior to submission of the motion for summary judgment and was thus waived. Therefore, it is unnecessary to reach the issue of whether Graves is a professional for purposes of § 25-222. The judgment of the district court is reversed and the cause remanded for further proceedings.
REVERSED AND REMANDED FOR FURTHER PROCEEDINGS.
