Mr. Justice Bean
delivered the opinion.
This is an appeal from a judgment of the circuit court dismissing a writ of review, and affirming a judgment of a justice’s court. The facts are that on July 27, 1895, the defendant in this proceeding commenced an action in the justice’s court for Salem District against Ben. and Clell Hayden to recover $121.76 upon an account for goods, wares and merchandise alleged to have been sold and delivered by his intestate to the defendants jointly. Both defendants were served with process, and answered separately, denying all the material allegations of the complaint. Upon the trial it appeared that the account sued on was made up in part of sundry items of goods, wares and merchandise sold and delivered to the defend*91ants jointly, and in part of goods sold and delivered to the defendant Ben. Hayden individually; whereupon the court segregated the several amounts due, and entered judgment against the defendants Ben. and Clell Hayden jointly for $76.90, and a several judgment against Ben. Hayden for the remainder, and the only point on this appeal is whether such judgment is valid.
1. At common law, in an action brought against two defendants on an alleged joint demand, a judgment could not be rendered against both for a part of the amount sued for, and a several judgment against one for the remainder, because (1) in such an action a judgment must be given against all the defendants or none; and (2) causes of action against two or more defendants could not be joined with a cause of action against one of them separately. The first of these objections, however, is obviated by sections 244 and 245 of our statute (Hill’s Ann. Laws), the effect of which is that “when in an action upon a joint contract it is determined that one or more of the defendants are not liable, but that one or more of the others are, judgment may be given and rendered against those liable, whether their liability be joint or several, and the other defendants may be dismissed”: Tillamook Dairy Association v. Schermerhorn, 31 Or. 308 (51 Pac. 438). But these sections are only intended to obviate the objection of a variance between the allegations and the proof, and to enable the plaintiff to recover one judgment against such of the defendants as may appear from the proof to be liable, notwithstanding the fact that other parties may be made joint defendants. They do not authorize different judgments in one action upon independent causes of action which, both at common law and under our statute, cannot be joined. It is expressly provided by statute that the causes of action which may *92be -united in one complaint ‘ ‘ must affect all the parties to the action” (section 93, Hill’s Ann. Laws), and this is but declaratory of the common law, and prohibits a joinder of separate and distinct causes of action against parties severally liable : Bliss on Code Pleading, § 123 ; LeRoy v. Shaw, 2 Duer, 626 ; Trowbridge v. Forepaugh, 14 Minn. 133 ; Langevin v. City of St. Paul, 49 Minn. 189 (51 N. W. 817). It is clear, therefore, that if the complaint had stated the causes of action according to the facts as found by the justice, it would have been bad on demurrer, and the plaintiff would have been compelled to amend by striking out one cause of action or the other ; and he cannot evade the effect of a misjoinder by alleging a joint cause of action, when in fact his proof shows that he is attempting to recover upon a cause of action against the defendants jointly, and also a cause of action against one of them severally.
This question was directly involved in Leonard v. Robbins, 13 Allen, 217. In that case the plaintiff brought a joint action against several defendants on several promissory notes, and the jury found a verdict against all the defendants on some of them, and against only one defendant upon one of the notes ; and it was held that separate judgments according to the findings of the jury could not be entered, but that the plaintiff must elect whether he would take judgment against all the defendants for the amount of the notes on which they had been found jointly liable, or against the one for the amount of the note on which he alone had been found liable.
2. When the misjoinder appears from the complaint it should be taken advantage of by demurrer, and the plaintiff required before trial to elect upon which cause of action he will proceed but, as it does not appear on the record in this case until the judgment, resort may be *93had to the writ of review for the correction of the error by a superior tribunal. It follows that the judgment of the circuit court must be reversed and set aside, and the cause remanded with directions to modify the judgment of the justice’s court by dismissing as to the defendants jointly, and giving judgment against Ben. Hayden on his several liability, or by dismissing as to him individually, and giving judgment against him and his co-defendant on their joint liability, as the plaintiff may elect.
Reversed.