This is a petition for a writ of mandate ordering the Superior Court of Sacramento County to try the action brought by petitioners, Channell and Klock, against Patrick A. Miller and the County of Placer to recover damages for personal injuries and property damage suffered in an automobile accident.
While driving together on March 17, 1963, in Placer County, petitioners were involved in an automobile accident with Miller, a resident of Sacramento County. Petitioners *248filed suit in the Superior Court of Sacramento County to recover for personal injuries and property damage. The suit against the County of Placer was based on negligent maintenance of a stop sign. Counts one and three of petitioners’ complaint stated causes of action against Miller and the County of Placer combined.
The County of Placer filed a timely notice of motion to change venue from the County of Sacramento to the County of Placer. The County of Placer was relying on section 394 of the Code of Civil Procedure, which provides in part: “ [A]ny action or proceeding against a ... county ... for injury occurring .therein, to person or property or person and property caused by the negligence or alleged negligence of such ... county ... or it's agents or employees, shall be tried in such county. ...” Petitioners filed a memorandum in opposition to the motion. Petitioners relied on section 395 of the Code of Civil Procedure which provides for venue in the county of residence of any defendant when two or more defendants are joined in one action. The court ordered the action transferred to Placer County for trial.
Petitioners contend that venue is proper in Sacramento County and that the trial court erred in ordering the action transferred to Placer County.
Because of the joinder of Miller and Placer County there is an apparent conflict in venue provisions. This problem is pointed out in 1 Chadbourn, Grossman & Van Alstyne, California Pleading, section, 375, page 324, wherein it is said: “... In view of the modern liberal rules governing joinder of causes and parties, it frequently is possible for a plaintiff to join together in a single complaint two or more causes of action, each of which is governed by a different venue rule, or to name as defendants two or more parties each of whom is susceptible to a different venue standard. Cases of this type are hére classed generically as ‘mixed actions. ’ The identifying characteristic of mixed actions is that two or more inconsistent venue provisions of the Code of Civil Procedure or of the Constitution appear to be concurrently applicable in the same casé.” And in Monogram Co. v. Kingsley, 38 Cal.2d 28, at page 31 [237 P.2d 265], the court said: “By reason of the liberal statutory joinder rules, a number of causes of action may properly be joined in the same complaint (Code Civ. Proc., § 427), and it is not necessary that each defendant be included in every cause of action. (Code Civ. Proc., § 379b;) As so noted, these joinder provisions must be correlated with *249the venue provisions—the former prescribing what causes and parties a single action may include and the latter prescribing where such action as an entirety may be tried.”
As stated in Monogram Co. v. Kingsley, supra, at pages 29 and 30: " [I]n the absence of specified exceptional eases not here involved (Code Civ. Proc., §§ 392, 393, 394), the ‘county in which the defendants, or some of them, reside at the commencement of the action, is the proper county for the trial of the action.’ (Code Civ. Proc., § 395.) Consistent therewith, the basic principles governing the determination of the venue issue were recently stated in the ease of Independent Iron Works v. American President Lines, 35 Cal.2d 858, at page 860 [221 P.2d 939] : ‘A defendant is not entitled to have an action removed to the county of his residence unless it appears that none of the other defendants are residents of the county where the action is brought. (Donohoe v. Wooster, 163 Cal. 114 [124 P. 730].) Even when all of the defendants join in a demand for or consent to a change of venue the cause will be retained if the complaint attempts in apparent good faith to state a cause of action against a defendant who resides in the county where the action was commenced. (McClung v. Watt, 190 Cal. 155 [211 P. 17].) When a defendant who resides in the county in which an action is brought is a necessary and proper party defendant it is immaterial that another and the principal defendant resides in another county. (Hellman v. Logan, 148 Cal. 58 [82 P. 848].)’...”
The question that we must decide in the case at bench is whether or not the general rule that the venue of a mixed action is in the county of any defendant’s residence is altered by the exceptional venue provision of section 394 of the Code of Civil Procedure hereinbefore set forth.
The precise question has not been decided in California. It was before the court in Newman v. County of Sonoma, 56 Cal.2d 625 [15 Cal.Rptr. 914, 364 P.2d 850], but the court felt that it was unnecessary to determine the issue because the county had waived any right to which it might have been entitled by failing to make the motion for change of venue within a reasonable time. The court said at pages 626-628: “The first question presented is whether section 394 affects jurisdiction in the fundamental sense, that is, whether only the Superior Court of Sonoma County and no other court has the power to try the action. Except in a few cases in which the Constitution makes the place of trial jurisdictional (see art. VI, § 5) or a statute makes a local place of trial part of *250the grant of subject matter jurisdiction, venue is not jurisdictional. (See 1 Within, Cal. Procedure, pp. 699, 719.) Section 394 is not the statute granting subject matter jurisdiction in this type of case and does not purport to specify the place of trial as part of such a grant. The authority to sue counties is set forth in the Government Code, without any limitation as to the place of the suit. (Gov. Code, § 23004, subd. (a).) The Legislature, instead of including the provision before us as part of the authorization in the Government Code, placed it in the Code of Civil Procedure among several venue provisions which are clearly not jurisdictional. (See Herd v. Tuohy, 133 Cal. 55, 59-60 [65 P. 139].) It should also be noted that section 394 provides that upon stipulation of the parties actions referred to in the section may be tried in any county.
6 6
“It is clear, therefore, that section 394 is not jurisdictional in the fundamental sense, but the county contends that the statute is, nevertheless mandatory and that the trial court erred in denying the motion for a change of venue. In this connection we need not consider what the proper relationship between section 16 of article XII of the Constitution and section 394 of the Code of Civil Procedure would be in a situation where both provisions are injected into the case by a joinder of defendants and remain operative until a motion for a change of venue is made under the statute. Even if it be assumed that the constitutional provision precluded application of section 394 at the outset of the action, the county could have resorted to the statute as of the time of the settlement agreement between plaintiffs and the railroad company. In view of the extent to which the county, after learning of the agreement, participated in the proceedings and delayed in making its motion, the trial court was entitled to determine that the county did not act within a reasonable time. ...”
The case of Smith v. Smith, 88 Cal. 572 [26 P. 356], dealt with the exceptional venue provision of section 392 of the Code of Civil Procedure, concerning an action involving real property. The action was to declare a conveyance, absolute upon its face, a mortgage, compel a reconveyance of the real and personal property included therein, and for an accounting and personal judgment thereon, and the Supreme Court held that the defendant was entitled to have the action transferred to the county of his residence. The *251court said at pages 576-578: “When, however, the subject-matter of the action is local, and the judgment which is sought is to operate directly upon that subject-matter, it is provided that the action shall be tried in the county where the subject-matter of the action is situated. This being an exception to the general rule, the conditions under which the exception is claimed must be clearly and distinctly shown. The plaintiff cannot, by uniting in his complaint matters which form the subject of a personal action with matters which form the subject of a local action, compel the defendant to have both those matters tried in a county other than that in which he resides. It is only when real estate alone is the subject-matter of the action that the provisions of section 392 can be invoked against a defendant who resides in a county different from that in which the land is situated. If, in his complaint, the plaintiff join with such a cause of action another which is not embraced in its provisions, or if he also seeks a remedy against the defendant upon matters which are not embraced within the provisions of this section, his action becomes one of those ' other cases’ provided for in section 395, which the defendant is entitled to have tried in the county of his residence.
( C
“. . Unless the cause of action set forth in the complaint falls wholly within the provisions of section 392, or of one of the two next succeeding sections, the provisions of section 395 prevail.”
We believe that Smith v. Smith, supra, is determinative of the issue here. Since the petitioners joined both Miller and the County of Placer in the cause of action set forth in their complaint, the cause of action did not fall wholly within the venue provisions of section 394 of the Code of Civil Procedure. Consequently, petitioners’ action was one of the “other actions” provided for in section 395 of the Code of Civil Procedure.
As pointed out in Newman v. County of Sonoma, supra, “section 394 is not jurisdictional in the fundamental sense.” Petitioners had a right to file the action for personal injuries in Sacramento County where the defendant Miller resided. Petitioners could also have filed the action in Placer County but they were not required to do so. If the cause of action were only against the County of Placer, said county would, of course, have been entitled under the provisions of section 394 to have the action transferred to *252Placer County, but where, as here, defendant Miller, a resident of Sacramento County, was joined as a defendant, the County of Placer was not entitled to such transfer.
It is true that a few other jurisdictions in dealing with somewhat similar statutes have held that venue statutes relating to suits against counties are not affected by other venue statutes. The reasoning of these eases is that in defending suits against counties its officers might be taken out of the county or called away from their public duties and the public interest would suffer. {Simpson v. Neshoba County, 157 Miss. 217 [127 So. 692].) However, we are not inclined to follow these cases because we believe that in any case where a county is sued in another county, and it appears that a number of its employees would be required to appear as witnesses, the superior court could undoubtedly act under section 397 of the Code of Civil Procedure and upon proper motion change the place of trial “when the convenience of witnesses and the ends of justice would be promoted by the change. ’ ’
It is a well-recognized rule that for purposes of statutory construction the various sections of all the codes must be read together and harmonized if possible. The authority to sue counties is set forth in subdivision (a) of section 23004 of the Government Code without any limitation as to the place of the suit, and the Legislature instead of including section 394 of the Code of Civil Procedure as part of the authorization of the Government Code placed it in the Code of Civil Procedure among several venue provisions which are clearly not jurisdictional. (Newman v. County of Sonoma, supra.) We are of the opinion that considering all the provisions of the Code of Civil Procedure relating to venue and the decisions of our Supreme Court interpreting them in the cases hereinbefore quoted, the defendant County of Placer was not entitled to have its motion for change of venue based on section 394 granted.
Petitioners also contend that the County of Placer waived any rights it might have had by failing to support the motion by an affidavit on the merits as required by section 396b of the Code of Civil Procedure. This contention is wholly without merit. Newman v. County of Sonoma, supra, held that the procedural requirements of section 396b do not govern a motion pursuant to section 394 of the Code of Civil Procedure. (See 1 Chadbourn, Grossman & Van Alstyne, California Pleading, § 403 (Supp. 1962).) The case does not specifically mention section 396b of the Code of Civil Procedure. But it holds that a motion for change of venue under *253section 394 of the Code of Civil Procedure need be made only within a reasonable time. Since section 396b requires that a motion to change venue be made at the time of filing the answer or demurrer, the court’s ruling that the motion under section 394 of the Code of Civil Procedure is governed by a reasonable time is tantamount to holding that section 396b of the Code of Civil Procedure does not control section 394 motions.
In view of the foregoing, we conclude that the court erred in ordering the action transferred to Placer County and that a writ of mandamus should issue directing the Superior Court of Sacramento County to proceed with the trial of said action in Sacramento County.
Let the writ issue as prayed for.