Not with this nonsense again...
There is a huge difference between shorter walls that under continuous human observation (Like the Berlin Wall), enclosed walled compound (That may or may not be guarded), and a massive border wall that covers thousands of miles.
In military doctrine, there is no such thing as an obstacle that actually blocks anything. All barriers do is delay. So walls that are continuously observed and guarded, like the Berlin Wall, are effective because someone will see you and stop you if you try to cross it (Possibly by shooting you, but that isn't the only way). Enclosed compounds like forts and residences are different as well, as the primary purpose of walls in that case is to establish clear boundaries, and arouse immediate suspicion if anyone sees you crossing. Again, they are usually paired with active monitoring systems, because the wall itself doesn't stop anybody.
As far as the Israeli border wall,
studies have shown that its greatest effect was in the immediate period after it was constructed, and rapidly declined in efficiency after that. The reason is quite simple, attackers learned how to deal with it. The Israeli wall is also very different in its intent, it is trying to stop terrorists, not immigrants. It isn't particularly successful against either.
As far as the shorter, observed border walls, those are quite effective, and we already use them on the border. Quite a lot in fact, and they are great and useful and we should absolutely keep them. We use them in areas of high volume crossings, such as around populated areas. Extending this to the entire border is not only ruinously expensive, but also runs into diminishing returns extremely hard. The idea that immigrants will just see a wall and give up is laughable. If a single wall was the only barrier between starvation and a better life for you and your family, would you stop? I know I wouldn't.