Hello, good morning everyone, guys consult, I'm involved with a query, I need to show data from 3 different tables, I get it, but I repeat the data (rows), I have given several turns and I do not give the drama hehe , someone sees something strange:
CREATE DEFINER='administrador'@'%' PROCEDURE 'spMostrarHorasAtencion'()
BEGIN
SELECT
h.idHoraAtencion,
p.nombres, p.ape_pat, p.ape_mat,
h.dia,
b.numBox,
ho.hora
FROM
profesional p INNER JOIN horas_atencion h
ON p.idRegistro= h.idRegistro,
boxes_atencion b INNER JOIN horas_atencion h1
ON b.idBox = h1.idBox,
hora ho INNER JOIN horas_atencion h2
ON ho.idHora = h2.idHora;
END
Greetings to all, thanks in advance