As I can do to obtain the data from a table1 that is not in another table2 and that is different from an id (idmodselection) that is in table2, I am working on 2 tables that are related, which are:
Tabla 1: requisitos
idrequisito int (Clave primaria),
nombrerequisito varchar(25)
Tabla 2: modalidad_requisito
idmodrequisito int (Clave primaria),
idmodseleccion int,
idrequisito int
I was testing with the sql statement that is not found (not exists)
SELECT * FROM requisitos r
WHERE NOT EXISTS
(SELECT * FROM modalidad_requisitos mr
WHERE mr.idrequisito=r.idrequisito AND mr.idmodseleccion!=10)
but the detail is when the condition that is different to the idmodseleccion, if you could give me an idea I would appreciate it.