0

Hi developpers i am trying to get data from the table "etudiant" where "etudiant" and the "enseignant " have the same foreginkey of table "service"

SELECT
    *
FROM
    etudiant
INNER JOIN etservice et1 ON
    et1.id_service = enseigant.id_service
INNER JOIN etservice ON etservice.id_service = etudiant.id_service
WHERE
    1 = 1
  • 1
    I think there is an error in the first join. It's referencing 'enseigant' but that table/view isn't specified anywhere else. Perhaps you meant: INNER JOIN enseigant – Dave Mar 16 '18 at 23:10
  • I didn't get it , am trying to do join without any need for an other table to save the relation .. how the code must be then ! – mohamed farjallah Mar 16 '18 at 23:12

0 Answers0