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 ...