The male officer had been attending calls about concerns for a man at the West Granton Road Campus when he sustained a wound to his back at around 9.30am.
He was taken to Edinburgh Royal Infirmary for treatment by the Scottish Ambulance Service.
The injury was later described as “non life threatening” while his alleged assailant was detained.
But chair of the Scottish Police Federation says the incident demonstrates that Scots officers are “not properly equipped” to deal with armed suspects.
Andrea MacDonald, chair of the Scottish Police Federation said: “I would like to commend the bravery of all of the Police Officers who attended this incident, undoubtedly their actions in protecting the public prevented further injuries or even fatalities.
“However, once again it appears that we have Scottish Police Officers not suitably equipped to deal with an incident where an individual is armed.
“Our thoughts are with the police officer who was injured and his family and colleagues at this time.”
Detectives said they had arrested and later charged a 19-year-old man in connection with the incident.
Deputy Chief Constable Iain Livingstone added: “Police Scotland always takes the welfare of its officers very seriously. We continually keep officer safety under review and regular liaison takes place with staff associations around this issue.
“As always, we will investigate this incident to see if there is anything to be learned from it. The officer’s injuries are thankfully not life- threatening and I intend to visit him tomorrow.”
Chief Inspector Stevie Sutherland, area commander for North West Edinburgh, said there would be increased patrols on site for the coming days.
He added: “This incident continues to be treated as isolated and we’re working closely with Edinburgh College to offer support to students and staff.
“There will be an increased police presence across the campus over the coming days and anyone with concerns is urged to speak to us or contact Edinburgh College’s Student Services Department.”
An area of the campus was cordoned off during the day while the college remained open. Principal Annette Bruton said they were working closely with Police Scotland.