The three-story building is located in the crowded Lagos Island area of the coastal megacity, which is home to more than 22 million people.
He said the collapsed building was a residential house with the school operating illegally.
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 rescue operations are however, suffering hitches, as rescuers are finding it hard to gain access into the building with their equipments.
Rescue efforts were underway in Nigeria on Wednesday after a three-story building housing a school collapsed while classes were in session.
One witness, Abdulazeez Elegushi, said "a quit notice was given to the owner of the building by the government after it failed integrity test", he told Daily Sun, speculating about the possible cause of the collapse.
About two dozen people have been rescued so far, said freelancer Anna Cunningham, reporting from the scene for CBC News.
"Top civil Rights group HURIWA is of the position that Lagos state government has failed in its statutory and primary duty of care to the children of Nigeria".
TVCNews gathered that 12 persons have been confirmed dead and 43 rescued. A yellow excavator scooped at the ruins.
With emotions high, a number of shirtless men jumped in to offer assistance, hacksaws and mallets in hand. One held a water bottle in his teeth.
In September 2014, 116 people died when a six-storey building collapsed in Lagos where a celebrity televangelist was preaching.
The collapse came as President Muhammadu Buhari, newly elected to a second term, tries to improve groaning, inefficient infrastructure in Africa's most populous nation.