I don’t know if walls work for desert spread. But I’ve been told “walls don’t work” for border security. If walls can’t stop people, I don’t see how they could stop wind and sand.
The second guy was french and wanted a wall around france where as nothing could get in nor escape.
The third asked the Genie about how secure and high the wall was, then requested his wish..."fill it with water".