Actually, it isn't quite that simple. It reminds me of basic firefighting training (as an analogy): A fire needs three things, combustable material, heat and oxygen. Remove one of them and you have no fire.
A similar thing applies to "school shootings". It takes somebody to pull the trigger, it takes a trigger to pull and it takes somebody to pull the trigger at.
Why did this guy want to kill people?
Why did this guy have a gun?
Did the guy want to kill these people in particular (as a group, not necessary as individuals)?
And so forth...
Lots of questions. Until somebody figures out the answers to all of them don't be surprised if it happens again as you won't know what warning signs to look for.
Edit: Substitute "figures out" with "understand" as opposed to "know". Knowing the answer isn't good enough, you need to understand the answer too