Most answers seem to focus on the child and how to console him. However, a child around this age still takes his cue from his parents/adults.
The first thing is to ask "What has been my expectation of him?", "Did my words or body language communicate my disappointment toward him?" For example, you have mentioned "poor". This is subjective. To you, it could be "poor" but to him, it could be "I've tried my best!".
At this point in time, consoling him would not be of much use if, in your heart, you still hold the idea that his results are "poor".
Having checked your own feelings, now affirm him that you accept his results, even when he has failed! If you can honestly tell yourself deep inside that a single exam result is not the end of the world for either of you, than look at him in the eyes, hold his hands, smile and say in your most reassuring tone, "It's OK" and give him a hug.
What you have just done is to bond with the child and gain his trust first with 2 words, "It's OK" and a smile. This would mean more than a whole lot of motivational words and lecture.
Once done, cool off. Some time later, wait for a "teachable moment" where you can sit and talk about areas of improvement. He will be more receptive of your words then.
It may be tough to do but its worth trying - my boy got his results today, too.