That's probably not the best example. Qin Shi Huang bankrupted China and killed a lot of his own people in the course of building that wall. Once it was done, the barbarians simply rode around it. That effort probably would have been better spent on a bigger, better military.
Hadrian’s Wall then? :)