You can restrict guns down enough so that only recreational users have them.
Maybe the word 'banned' gives off the wrong impression. Guns are 'banned' in the UK, but my uncle owns two shotguns, and my friends dad has rifles, and I've been shooting.
But the control and regulation (both in purchasing, and in storing) is so much greater, and the range of available guns is so much smaller, that our guncrime is almost non-existant.
And at any rate, guns do create certain crimes. There's never going to be a replication of a mass-shooting at a school with just knives. In fact, the only place that ever seems to happen is Japan/China, where it's a whole group of people with knives.