The attack took place at around 10:24 GMT, shortly after parents had gathered at the school gates. Prosecutor Chris Paxton KC told the jury that the defendant, who cannot be named for legal reasons, had armed himself with a kitchen knife and "went to school not to learn, but to kill". He was described as "dressed in black, masked up and tooled up".
The defendant, now 16, has pleaded guilty to possessing a kitchen knife but denies attempted murder. The trial at King's Lynn Crown Court continues.