0
How to put two records from one table into another as one in select Mysql Database?
SELECT TURMA.turma_id, TURMA.turma_nome, PROF.prof_name
from turma TURMA LEFT JOIN professor_materia PROF_MAT
ON TURMA.turma_id=PROF_MAT.prom_mat LEFT JOIN professor PROF
ON PROF_MAT.prom_prof=PROF.prof_id
I wish you’d turn around like this:
turma_id | turma_nome | prof_name
1 | 1º ANO A | PROFESSOR DE MATEMATICA, DANIEL
2 | 2º ANO | NULL
Thanks in advance.