Schools are facing a "behaviour meltdown" and should install CCTV and metal detectors to prevent a rise in weapon use, teachers say.
The NASUWT education union called for all buildings to be secured to avoid break-ins by vandals, strangers and angry parents.
One father had come into school and beaten up a pupil, a conference heard.
In another case, a female primary school teacher had been assaulted 150 times in six months by the same pupil.
Paul Davies, a teacher from Wrexham, told the NASUWT's conference in Brighton he had found what he thought was a yellow sweet on the classroom floor one day.
It was in fact an airgun pellet. Two pupils had fired 250 at each other and other children.
Mr Davies said: "If a school has a problem with offensive weapons, then the technology to deter such weapons should be available to that school."
He added: "We must tackle low-level disruption or face possible behaviour meltdown."
In many schools, pupils were swearing at teachers, delegates heard.
Ralph Robbins, from Cornwall, said a female primary school teacher had been attacked 150 times in six months.
The boy responsible had kicked, punched, bitten and scratched her. He had also stabbed her with a dinner fork, jumped on her back and thrown a table at her.
School security was criticised during the debate.
Securing schools is expensive, but failing to do so is worse
Karen Diederich, Hampshire teacher
Karen Diederich, from Hampshire, told how one father, angry about the behaviour of a boy towards his daughter, came into a school and punched him in the face.
Elsewhere, an excluded pupil had walked into a classroom and stabbed another boy.
Ms Diederich said: "They were serious incidents but they could have been much worse.
"Securing schools is expensive, but failing to do so is worse."
However, Peter Tippetts, from Southampton, warned that having metal detectors on school gates could actually increase weapons use.
He said: "Our problem is that once we start on the path of metal detectors there's no going back.
"Actions create reactions. Every pupil worth his salt is going to try to evade it and get round it."
Society as a whole had to tackle young people's interest in knives and guns, he said.
NASUWT delegates voted for warning signs about behaviour to be posted around schools.
The union also called for risk assessments to be carried out on pupils with emotional and behavioural problems.