Officials of the Lagos State Emergency Management Agency (LASEMA) and other rescue officials had rescued some of the children trapped in the building, while those who sustained injuries among the pupils were taken to the hospital.
The school was on the third floor of the three-storey building, and the collapse happened around 10am local time, as classes were under way.
Several news outlets reported at least eight people died, as of Wednesday night.
Around 8 a.m. on Wednesday, Adedayo Adedoyin waved her 6-year-old twin son and daughter off as they took the short walk to their school, a few meters away from their home in Lagos Island.
Ambode also said the school had been set up illegally and that buildings in the area were undergoing integrity testing.
"We are still trying to find out how many are trapped inside" but probably scores of people, said police officer Seun Ariwyo.
"Consequently, 1,842 sites were visited, 1,392 test advice notices were served and information on buildings identified as distressed were forwarded to the Lagos State Building Control Agency (LASBCA) for necessary action", he stated.
The Lagos State Governor, Akinwunmi Ambode, has vowed to demolish all illegal school buildings in the Ita Faji area of the state.
Salami said: "It was because of the situation of the building that forced me to resign from the school in December because I don't want to risk my life".
Mr Esinlokun said that the Lagos State Government would ensure that victims of the incident were treated in hospitals for free.
'Unbelievable': When Craig Perks stunned golf with his Players Championship win
That's followed by the Dell Technologies Match Play, a World Golf Championship for which he had not been eligible since 2014. Some plays will be geared toward cash games, and some for GPP tournaments.
It is not yet known what caused the collapse of the three-story building in a densely crowded neighborhood at the heart of Nigeria' commercial capital, Lagos.
Most buildings here "are said not to be in very good condition", Sam Olukoya, a Nigeria-based freelance journalist told NPR's Ofeibea Quist-Arcton.
She said the three-storey building was among those marked by the officials.
A young man helping rescue efforts who gave his name only as Derin said "at least 10 children" were trapped inside but "thought to be alive".
School bags, toys and clothes could be seen among the piles of rubble as a bulldozer tried to clear a path through some of the wreckage to help the rescue efforts.
"I want to commiserate with the families of those who lost their lives in this collapsed building".
In 2016, a church that was still under construction collapsed in Uyo, after building was rushed to meet a deadline.
Building collapses are frequent in Nigeria, where new structures often go up without regulatory oversight.
"If the structural strength is too weak, it should be recommended for full or partial demolition, in which case there must be compensation from the government that approved the building plans" he said.