When you assign the second level page to the first level page, you are most likely using the Parent page ID, so each child page will have a column in which that parent ID is stored.
When you delete the parent page, you will have to pass the parent id, say the parent id is 4:
DELETE FROM parentTable WHERE ID = 4
you pass that same id when delting from the child table:
DELETE FROM childTable WHERE parentID = 4