UPDATE REGISTRATION, CANDIDACY, EXECUTION_DEGREE, DEGREE_CURRICULAR_PLAN, DEGREE 
SET REGISTRATION.KEY_DEGREE = DEGREE.ID_INTERNAL WHERE 
REGISTRATION.KEY_STUDENT_CANDIDACY = CANDIDACY.ID_INTERNAL AND 
CANDIDACY.KEY_EXECUTION_DEGREE = EXECUTION_DEGREE.ID_INTERNAL AND 
DEGREE.ID_INTERNAL = DEGREE_CURRICULAR_PLAN.KEY_DEGREE AND 
DEGREE_CURRICULAR_PLAN.ID_INTERNAL = EXECUTION_DEGREE.KEY_DEGREE_CURRICULAR_PLAN;