
112 Cal.App.2d 27 (1952)
MARGARET F. AHERN et al., Petitioners,
v.
SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; CHARLES M. KING et al., Real Parties in Interest.
Civ. No. 19088. 
California Court of Appeals. Second Dist., Div. Three.  
June 25, 1952.
 Thomas R. Fisher and Holbrook, Tarr & O'Neill for Petitioners.
 Harold W. Kennedy, County Counsel, and William E. Lamoreaux, Deputy County Counsel, for Respondent.
 McLaughlin & Casey for Real Parties in Interest.
 VALLEE, J.
 Petitioners seek a writ of mandate commanding the Superior Court of the County of Los Angeles (1) to annul its order granting a motion of defendants to quash a subpoena for the taking of the deposition of one Jack Kissel in an action pending in that court entitled Margaret F. Ahern et al. v. Charles M. King et al., No. 567679, (2) to deny the motion, and (3) to enforce the claimed right of petitioner to take the deposition under subdivision 6 of section 2021 of the Code of Civil Procedure.
 Petitioners brought action 567679, a stockholder's derivative suit for an accounting, for the benefit of Southern California Meat Company, a corporation, referred to as the corporation. The named defendants are Charles M. King, William L. Koch, Herbert Kinney, and Trophy Meat Packers, Inc., a corporation. The complaint alleges that during 1943, 1944, and 1945 the defendant Charles M. King, acting on behalf of the corporation, leased some of its wholesale facilities to others at a stated rental; that in addition to the stated rental which was paid to the corporation, King exacted rent from said wholesalers for the use of the facilities of the corporation in the sum of $140,000; that King collected the $140,000 and did not pay it to the corporation.
 The defendants Charles M. King, William L. Koch, and Trophy Meat Packers, Inc., filed an answer, verified by King, *29 specifically denying the aforesaid allegations of the complaint.
 Thereafter at the request of the plaintiffs a subpoena issued for the taking of the deposition of Jack Kissel. The affidavit upon which the subpoena issued states that Kissel is the only witness who can testify that: about November, 1942, he, as a partner in a hotel and restaurant supply company, leased space and facilities from the corporation; King acted for the corporation; commencing in November, 1942, and continuing through 1944, Kissel and his partners continued to lease the space and facilities; during this period of time King demanded sums of money of Kissel to be paid weekly to King in addition to the agreed rent; Kissel will testify that the sums so paid exceeded $140,000; Kissel is the only person who can testify to the payments of said sums and to the amounts; no person other than King and Kissel was present at the times the sums were paid.
 The defendants filed a motion to quash the subpoena, which was granted. The affidavit filed in support of the motion did not deny that Kissel and King were the only persons present at the times of the alleged payments. The motion was based on the ground that the facts do not come within subdivision 6 of section 2021 of the Code of Civil Procedure.
 The matter is submitted on the petition for the writ, the demurrer of respondent court, and the demurrer and answer of the real parties in interest. No issue of fact is made.
 Section 2021 provides: "The testimony of a witness in this State may be taken by deposition in an action at any time after the service of the summons or the appearance of the defendant, and in a special proceeding after a question of fact has arisen therein, in the following cases: 1. When the witness is a party to the action or proceeding ...; ... 6. When the witness is the only one who can establish facts or a fact material to the issue; provided, that the deposition of such witness shall not be used if his presence can be procured at the time of the trial of the cause; ..."
 Is Kissel the only witness who can establish facts or a fact material to the issue? Does the fact that King, a party-defendant to the action, will testify contrary to the testimony to be given by Kissel, preclude Kissel from being the only witness who can establish the facts or a fact, as argued by respondents? The question presented was expressly left *30 open in Verdier v. Superior Court, 88 Cal.App.2d 527, 535 [199 P.2d 325].
 [1] Section 2021 is "to be liberally construed, with a view to effect its objects and to promote justice." (Code Civ. Proc.,  4.) "The statute authorizing the taking of depositions to be used in pending trials should be liberally construed to the end that a litigant in a pending action may be afforded a reasonable opportunity to procure available testimony in support of his cause. (Pollak v. Superior Court, 197 Cal. 389 [240 P. 1006].) That opportunity, under some circumstances, might prevent a miscarriage of justice." (Moran v. Superior Court, 38 Cal.App.2d 328, 334 [100 P.2d 1096].) "The taking of a deposition is one of the most efficient and necessary proceedings known to the law in aid of the court and in furtherance of the ends for which the court was created." (Burns v. Superior Court, 140 Cal. 1, 10 [73 P. 597].) The provisions of the code with respect to the taking of depositions "were designed to simplify procedure--to promote the ends of justice by enabling litigants to protect their substantial rights by simpler, speedier, and more efficacious means. Among the most important rights of a litigant is that of securing the evidence by which the justice of his claim or defense may be established, and when there is but a single witness upon a material point, ... the necessity of taking [his deposition] is apparent." (San Francisco Gas & Electric Co. v. Superior Court, 155 Cal. 30, 35-36 [99 P. 359, 17 Ann.Cas. 933]; Golden State Co. v. Superior Court, 25 Cal.App.2d 176, 178 [76 P.2d 728].) [2] Ordinarily a litigant is entitled to take a deposition in the cases provided for, as a matter of right. (Carnation Co. v. Superior Court, 96 Cal.App.2d 138, 140 [214 P.2d 552]; Patrick Farms, Inc. v. Superior Court, 13 Cal.App.2d 424-425 [56 P.2d 1283].)
 [3] A party to an action may well be, and usually is, a witness in his own behalf (Code Civ. Proc.,  1878); but such a person is not thereby to be considered a "witness" for the purposes of subdivision 6. (See Bagley v. District Court, 218 Iowa 34 [254 N.W. 26, 28-29]; Hamilton Co. v. Goring, 65 R.I. 459 [16 A.2d 334-335]; Hubbard v. Haynes, 189 Tenn. 335 [225 S.W.2d 252]; Ex parte Cross, 247 Ala. 85 [22 So.2d 378, 381-382]; In re Deming, 44 Del. 470 [61 A.2d 657, 659].) [4] Subdivision 1 of section 2021 declares that the deposition of an adverse party and certain officers, agents, and employees of an artificial entity which is a party, may always be taken. The remainder of the section *31 authorizes the depositions of witnesses not parties to an action. The two types of depositions are distinguishable: one is discovery, the other is not. [5] The fundamental purpose of taking the deposition of a party is to obtain information, to give a party the advantage of knowing prior to the trial what his opponent's testimony will be, and to serve the very useful purpose of limiting the need of proof of issues by substituting for testimony given at the trial the admissions and the information secured from the adversary before the trial. [6] The basal purpose of taking the depositions of witnesses is to make certain that their testimony will be available at the trial. This is evident from the fact that such depositions cannot be taken unless it appears probable that the attendance of the witness at the trial may not be secured. In the case of a party, no such showing is necessary. The Legislature evidently considered the fact that when the witness is the only one who can establish facts or a fact material to the issue the danger of loss of proof is aggravated. [7] The distinction is evidenced further by the provision that a witness must be unavailable at the trial in order to use his deposition as evidence, whereas the deposition of a party is admissible as evidence even though the party who gave the deposition is present at the trial. (Code Civ. Proc.,  2021(6), 2032.) It has been said that subdivision 6 refers to the taking of the deposition of a witness who is not a party to the action. (Johnson v. McDuffee, 83 Cal. 30 [23 P. 214]; Verdier v. Superior Court, 88 Cal.App.2d 527, 532 [199 P.2d 325]; 4 So.Cal.L.Rev. 184.) The obvious object of subdivision 6 is to vest in a party to an action the right to make certain that the testimony of a witness, as distinguished from a party, shall be available at the trial to prove one or more issues in the case when the witness is the only one who can establish facts or a fact material to such issue or issues.
 [8] We are considering a fact or facts to be established by the plaintiffs. Manifestly, a party cannot establish a fact or facts by an adverse party who has denied in his answer that such fact or facts occurred. Can it be said that anyone other than Kissel can establish the fact that he paid money to King over and above the agreed rent for the facilities of the corporation, the times payments were made, and the amounts? Obviously not. The facts cannot be established by King. To establish is to prove as true. King denies Kissel paid him any money over and above the agreed *32 rent. If King were called as a witness by the plaintiffs, instead of establishing--proving true--the facts they seek to establish, they would establish the contrary.
 We conclude that upon the facts Kissel is the only "witness" who can establish facts or a fact material to the issue, and that petitioners are entitled as a matter of right to take his deposition.
 In view of our conclusion it is unnecessary to consider petitioners' further contention that they made a case for the taking of the deposition under subdivision 4 of section 2021.
 The demurrers to the petition are overruled. Let a peremptory writ issue as prayed.
 Shinn, P. J., and Wood (Parker), J., concurred.
