good day I am creating 2 temporary tables the first table is called QUESTIONS
CREATE temporary table PREGUNTAS( idpregunta int auto_increment, primary key(idpregunta), pregunta varchar(200) );
the second one is called OPTION
CREATE temporary table OPCION ( idopcion int auto_increment, primary key(idopcion), opcion varchar(50), valor int, foreign key(idpregunta)references PREGUNTAS(idpregunta) );
I need the QUESTIONS table to have relation with OPTION, I realize it as it is in option but it marks me error saying that idpregunta does not exist in the table, I hope and they can help me to correct. Or is it an error due to the fact that it is a temporary table? THESE TABLES ARE CARRIED OUT BEFORE CLOSING CONNECTION.