Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql multiple left joins on same table

SELECT
   xxx,
   p1.NAME as p1name,
   p2.NAME as p2name
FROM Table1
LEFT JOIN Table2 AS p1 ON Table1.worker1 = p1.ID
LEFT JOIN Table2 AS p2 ON Table1.worker2 = p2.ID
WHERE ...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #multiple #left #joins #table
ADD COMMENT
Topic
Name
7+5 =