Dreaming of having an exam gives you the space to focus on what you've learned and prevents you from being so critical of your behaviours.
If you have been fixated on what you haven't achieved lately rather than what you have then this may be your unconscious telling you to take stock of the things you have under your belt. This- as opposed to comparing yourself to others and seeing the things they have that you don't.
Feeling unprepared for an exam can be a reflection of real life. You may not feel you are prepared for something that is looming in your own waking hours.
This dream is fairly common among people who are on a low wage, who want to change jobs so they can get a better income but think that they are stuck in their current position.
You might also get this dream if you feel you can't solve an important life problem- which is generally down to a perceived lack of skills. The lack of skills is synonymous with the lack of time/studying in the dream.
If you struggle to find a solution to a problem on your test paper, in other words a problem in your real life, it is likely that this dream will repeat itself. Such a dream is your mind telling you that this issue is still there and something needs to be done about it rather than ignoring it.
Source: The Complete A-Z Dictionary of Dreams by Ian Wallace
Tagged in Dream Interpretation