
523 P.2d 1230 (1974)
Doral D. GOODSEL, an Individual, and Union Pacific Railroad Company, a corporation, Plaintiffs and Respondents,
v.
DEPARTMENT OF BUSINESS REGULATION of the State of Utah et al., Defendants and Appellants.
No. 13585.
Supreme Court of Utah.
June 25, 1974.
*1231 Vernon B. Romney, Atty. Gen., Verl R. Topham, Sp. Asst. Atty. Gen., Salt Lake City, for defendants and appellants.
S.M. Matheson and Robert N. Weatherbee, Salt Lake City, for plaintiffs and respondents.
ELLETT, Justice:
This is an appeal from a summary judgment wherein the trial court held certain portions of the Plumbers Registration and License Law to be unconstitutional and directed the defendants to issue a journeyman plumber's certificate to the plaintiff Goodsel. There are no disputed issues of fact in the case.
The Union Pacific Railroad Company maintains depots in various places in this state and from time to time requires the services of a plumber. It is often difficult to obtain the services of a licensed plumber in the remote areas of the state, and for that reason it is necessary to employ plumbers who perform services where and as needed by the company.
Section 58-18-2(a), U.C.A. 1953 Replacement Volume 6A), provides as follows:
Each applicant for a certificate to engage in the trade of plumbing as a journeyman plumber, must produce satisfactory evidence that he has completed at least three and one-half years of training as an apprentice plumber under a duly licensed plumbing contractor, and is of good moral character, and pass a satisfactory examination under the rules and regulations of the department of registration.
The Union Pacific Railroad Company has in its employ one duly licensed journeyman plumber, and Mr. Goodsel has completed more than three and one-half *1232 years as an apprentice plumber working under his direction. In addition to the work performed as such apprentice, Mr. Goodsel has attended and successfully completed all classes in plumbing given by the Utah Technical College. He has also passed the examination given by the defendants for journeyman plumbers, and it is not denied that he is qualified to perform the work of a journeyman plumber. The defendants denied the certificate because Mr. Goodsel was not enrolled in an approved apprentice program.
Since there is no way to compel a licensed plumbing contractor to supervise an apprentice, the result is to permit the plumbers of this state to have complete control over the number of plumbers to be certified and to decide who will be permitted to take the examinations given by the defendants.
The trial court considered the statute which permits such a situation to exist to be in violation of certain constitutional provisions.[1]
A law should be held in violation of the constitution only when necessary to do so in granting a constitutional right to an aggrieved party. If it is possible to redress the wrong by means other than a declaration of the unconstitutionality of a statute, the statute should not be stricken down.[2]
In this case Mr. Goodsel can be granted relief without the necessity of holding the statute unconstitutional. The case of Merrill v. McGinn et al., decided by this court on February 20, 1974,[3] seems to be controlling. There, Merrill, an applicant for a license as a certified public accountant, was denied certification on the technicality that he had not had the required work as an apprentice. It appeared that he had the equivalent of the requirements set out by the defendants. He had passed the examinations given for certification as a certified public accountant, and we affirmed the trial court in holding that the action of defendants was arbitrary, capricious, and without foundation in fact or law.
It appears to us that the trial court was correct in ruling as he did.
Although the trial court based his ruling upon the unconstitutionality of the statute, he did not need to do so. Since his ruling was correct, we should affirm him if the record is such as to permit us to do so. The law is stated in 5 C.J.S. Appeal and Error § 1464(1) as follows:
The appellate court will affirm the judgment, order, or decree appealed from if it is sustainable on any legal ground or theory apparent on the record, even though such ground or theory differs from that stated by the trial court to be the basis of its ruling or action, and this is true even though such ground or theory is not urged or argued on appeal by appellee, was not raised in the lower court, and was not considered or passed on by the lower court.
The judgment is affirmed. No costs are awarded.
CALLISTER, C.J., and HENRIOD, CROCKETT and TUCKETT, JJ., concur.
NOTES
[1]  The court also held that Section 58-18-7, U.C.A. 1953 (Replacement Vol. 6A), was violative of the constitution.
[2]  16 C.J.S. Constitutional Law § 94.
[3]  30 Utah 2d 421, 518 P.2d 1392.
