I have the following problem:
I have two tables. students and proof
Students have 10 students evidence has 9 results (because one student was absent)
The union of the tables occurs through the enrollment field.
I want to merge the two tables and display all the students (including what was missing). In research I saw that using LEFT JOIN would do it.
I'm getting display. But the missing student does not show up.
My query looks like this:
SELECT alunos.*, provas.* FROM alunos
LEFT JOIN provas ON alunos.matricula = provas.aluno_matricula
WHERE provas.cod_prova = '00112233'
ORDER BY alunos.nome ASC
This type of query would agree to display the name of the student that has in the table students and does not have in the notes table?
Thank you!