UPDATE REGISTRATION INNER JOIN CANDIDACY ON CANDIDACY.ID_INTERNAL = REGISTRATION.KEY_STUDENT_CANDIDACY SET REGISTRATION.NUMBER = CANDIDACY.STUDENT_NUMBER;