All persons may join in one action as plaintiffs if they assert any right to relief, jointly, severally, or in the alternative with respect to or arising out of the same transaction, occurrence, or series of transactions or occurrences and if any question of fact or law common to all these persons will arise in the action. All persons may be joined in one action as defendants if there is asserted against them jointly, severally, or in the alternative, any right to relief with respect to or arising out of the same transaction, occurrence, or series of transactions or occurrences and if any question of law or fact common to all defendants will arise in the action. A plaintiff or defendant need not be interested in obtaining or defending against all the relief demanded. Judgment may be given for one or more of the plaintiffs according to their respective rights to relief, and against one or more defendants according to their respective liabilities.
The court may make such order as will prevent a party from being embarrassed, delayed, or put to expense by the inclusion of a party against whom the party asserts no claim and who asserts no claim against the party, and may order separate trials or make other orders to prevent delay or prejudice.