CCP 862     

Art. 862.  Relief granted under pleadings; sufficiency of prayer

Except as provided in Article 1703, a final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in his pleadings and the latter contain no prayer for general and equitable relief.