
3 Cal.App.2d 299 (1934)
REDONDO IMPROVEMENT COMPANY (a Corporation) et al., Appellants,
v.
CITY OF REDONDO BEACH (a Municipal Corporation) et al., Respondents.
Civ. No. 5260. 
California Court of Appeals. Third Appellate District.  
December 22, 1934.
 Gibson, Dunn & Crutcher and L. W. Butterfield for Appellants.
 Clyde Woodworth, City Attorney, and Ray E. Nimmo for Respondents.
 Thompson, J.
 The plaintiffs have appealed from that portion of a judgment which was rendered against them following an order of the court sustaining the defendants' objection to the introduction of evidence at the trial, on the ground that the complaint fails to state a cause of action. The plaintiffs' application to amend their complaint was denied.
 This is a suit for injunction to prohibit the City of Redondo Beach from interfering with the sinking of an oil well within the boundaries of that city. It is alleged that the plaintiff, Redondo Improvement Company, is the owner of 118 acres of land in the extreme southerly portion of the City of Redondo Beach, which land is subdivided into lots and blocks; that this land is remote from the business and residential portion of the city, and is occupied and used only for Japanese truck gardening, except that a few temporary gardeners' shacks have been constructed thereon; that an oil well was drilled on lot 24, block 10, of the Redondo Improvement Company's land in 1921, which well ever since its completion has, and now does, produce 27 barrels of oil a day; that the owner of said property leased to the plaintiff, Chanslor-Canfield Midway Oil Company, lots 4 and 5 in block 11 of its property on December 19, 1922, for the purpose of sinking an oil well thereon; that the lessee of the last-mentioned lots is prepared to and is desirous of immediately sinking an oil well thereon, but *301 that the City of Redondo Beach and its officers have prohibited it from doing so and threaten to enjoin the operations of the lessee and arrest its officers and employees if it attempts to proceed to sink the well; that the site of the proposed well is adjacent to the extreme southwesterly boundary of the city just beyond which other oil wells are located which are rapidly exhausting the plaintiffs' supply of oil and gas; that in October, 1931, the City of Redondo Beach adopted two ordinances, which are attached to the complaint as exhibits, prohibiting the future sinking of oil wells within the district in which the plaintiffs' property is situated, but that these ordinances "are invalid, unreasonable, arbitrary and discriminatory, ... and are void and of no effect, ... and each of them impair the obligation of the contract between the plaintiffs and deprive each of the plaintiffs of its property without compensation therefor and without due process of law". The complaint then alleges that plaintiffs are without speedy or adequate remedy at law, and asks the court to declare the invalidity of the zoning ordinances with respect to the plaintiffs' existing and proposed oil wells. An injunction is sought to prevent the defendants from interfering with the sinking of the proposed well.
 Without filing a demurrer to the complaint, the defendants answered specifically, denying all of the essential allegations of the complaint and affirmatively alleging that the city does intend to prevent the plaintiffs from proceeding to sink the proposed oil well under the authority vested in it pursuant to the zoning ordinances referred to in the complaint.
 Upon the issues thus presented, the cause was set for trial for October 24, 1932, at which time respective counsel and the witnesses were present and ready for trial. Without warning, the defendants orally demurred to the complaint on the ground that it fails to state facts sufficient to constitute a cause of action. This demurrer was overruled. The defendants then objected to the introduction of any evidence on the ground that the complaint fails to state facts sufficient to constitute a cause of action. This objection was sustained without leave to amend, except that the court did overrule the objection in part and received evidence with respect solely to the 27-barrel a day well which has *302 been operated since 1921, prior to the adoption of the zoning ordinance. The request of the plaintiffs to introduce evidence on the other issues of the case was refused. The plaintiffs then requested that they be granted permission to amend their complaint, which was promptly denied. The court then rendered judgment holding that the ordinances had no application to the oil well which was completed prior to the adoption of the ordinances and restrained the defendants from interfering with the operation of that particular well, but held that the plaintiffs should otherwise take nothing by their action. From the order sustaining defendants' objection to the introduction of evidence with respect to the chief issues of the case, and denying plaintiffs the privilege of amending their complaint, and from the judgment which was accordingly rendered the plaintiffs have appealed.
 We are of the opinion the court abused its discretion in sustaining defendants' objection to the introduction of evidence on the chief issues of the case without granting them leave to amend their complaint. [1] The court properly overruled the purported oral demurrer to the complaint. There is no such pleading recognized by our law as an oral demurrer. It is a mandatory provision of our statute that a demurrer in a civil action shall be presented in writing and filed with the clerk. (Sec. 465, Code Civ. Proc.; Fletcher v. Maginnis, 136 Cal. 362 [68 P. 1015].) [2] It is true that an objection to the introduction of evidence on the ground that the complaint fails to state facts sufficient to constitute a cause of action serves the same office as a general demurrer on that ground, and that the insufficiency of the allegations of a complaint may be raised by an objection to the introduction of evidence, even though a demurrer is not first filed. (Chapman v. Gillett, 120 Cal.App. 122 [8 PaCal.2d 184]; sec. 434, Code Civ. Proc., 21 Cal.Jur. 250, sec. 175; Bell v. Thompson, 147 Cal. 689 [82 P. 327]; Norton v. Bedell Eng. Co., 88 Cal.App. 777 [264 P. 311]; Reid v. Thomas, 99 Cal.App. 719 [279 P. 226].) [3] But it is a well-established rule which is founded on justice and good reason that a court should exercise liberality in permitting the amendment of pleadings to adequately present the necessary issues at any and all stages of the proceeding. (Robertson v. Burrell, 110 *303 Cal. 568 [42 P. 1086].) In 21 California Jurisprudence, page 183, section 127, it is said in that regard:
 "Great liberality should be shown by a court, at all stages, in permitting such amendments as will facilitate the production of all the facts bearing upon the questions involved in an action, where this can be done without working great delay and without jeopardizing the rights of an adverse party, and where the cause of action or the issues involved therein will not be radically changed."
 [4] In the present case it does not appear there would have been any delay or inconvenience to the parties by permitting the plaintiffs to amend their complaint, if the court deemed it necessary for them to do so. The respective parties were present with their witnesses in court ready to proceed with the trial. The defendants failed to previously demur to the sufficiency of the complaint. The plaintiffs had no warning that their complaint was considered defective in any respect. They had set up in elaborate detail all the facts of their case including both ordinances upon which the defendants rely. They might have proceeded with the trial with permission for the plaintiffs to file their amended complaint before the termination thereof. Their request to file an amended complaint was denied. Evidently the court assumed, without evidence, that the ordinances were valid and binding and absolutely prevented the plaintiffs from sinking an oil well in the prohibited zone within the city boundaries. The plaintiffs in good faith relied upon the asserted invalidity of the ordinances. It was specifically alleged that the ordinances were invalid and void. This raises the issues of the regularity of the adoption of the ordinances, the uniform application of their provisions and the reasonableness of the prohibitive measures with respect to the various zones of the city. Mere uncertainties of the allegations of the complaint were waived by failure to demur on that ground. The objection to the introduction of evidence merely serves to raise the one question of jurisdiction for failure to state any cause of action. Under such circumstances every uncertainty should be resolved in favor of the sufficiency of the complaint. If it may reasonably be said that the complaint does state a valid cause of action, even though it be deemed to be defective or uncertain, the objection to the introduction of evidence should have *304 been overruled. At least, under the circumstances of this case, the plaintiffs should have been afforded a reasonable time within which to amend their complaint.
 The judgment and order are reversed in so far as they apply to the issues which are involved, with the exception of that portion which affects the operation of the oil well which is maintained on lot 24, block 10, above referred to, and the court is directed to grant plaintiffs a reasonable time within which to amend their complaint.
 Plummer, J., and Pullen, P. J., concurred.
