News channels broadcast images of the President and his wife walking down a corridor at Broward Health North hospital in Pompano Beach on Friday, where they spent time with patients and caregivers.
“It’s very sad, something like that could happen,” The New York Times quoted Trump as saying on Friday.
The President and his wife also paid tributes to doctors and emergency workers for quickly transporting people to the hospital after the attack on Wednesday at the Marjory Stoneman Douglas High School in Parkland.
The hospital, a level two trauma centre, is located nine miles from the high school.
“The job the doctors did, the nurses, the hospital, first responders, law enforcement – really incredible… I want to congratulate them,” Trump said.
After the hospital visit, the Trumps travelled to the nearby Broward County Sheriff’s Department headquarters in Fort Lauderdale and heralded the law enforcement officials who responded to the shooting, CNN reported.
“What a great job you’ve done, and we appreciate it very much,” Trump said.
“Everybody is talking about it… I hope you are getting the credit for it because believe me, you deserve it. The job you have done is unparalleled.”
The Trumps were joined at the headquarters by Florida’s Senator Marco Rubio, Florida Governor Rick Scott, Florida Attorney General Pam Bondi and White House Chief of Staff John Kelly.
A White House statement issued later on Friday said the Trumps visited the hospital and the sheriff’s headquarters “to pay their respects and thank the medical professionals for their life-saving assistance” in response to shooting.
The massacre, one of the worst mass shootings in US history, was carried out by a former student of the school, Nikolas Cruz, 19. He killed 17 people and injured 15 others.
He was expelled from the school for “disciplinary reasons”.
Cruz, who has had a history of mental illness, is currently at the main Broward County jail facing 17 counts of premeditated murder.