have  a  try:select  b.姓名,c.姓名 from table1 a, table2 b ,table2 c
where a.职工甲=b.代码 and a.职工乙=c.代码