The cursors have to be declared after the table is created.