Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

multiple row join

SELECT l.name AS subject_name,  
  t.last_name AS student_last_name,
  st.last_name AS teacher_last_name
FROM learning AS l 
JOIN subject s ON l.subject_id=s.id
JOIN student st ON l.student_id=st.id
JOIN teacher t ON l.teacher_id=t.id;
Source by learnsql.com #
 
PREVIOUS NEXT
Tagged: #multiple #row #join
ADD COMMENT
Topic
Name
9+9 =