mysql - Replace the id's with name using single query -
select team_with.participant1,team_with.participant2,team_with.participant3 event,team_with team_with.for_event_no=event.event_no , event.event_no=4 , team_with.participant1=9 or team_with.participant2=9 or team_with.participant3=9; i have written particular query, , obtained required id's in row. not able modify query such that, in place of these id's, names connected id's displayed. the student_detatil table consists of pk(sam_id) , attribute name . ids displayed present query fks connected student_detail.sam_id. . it seems bad design multiply columns storing different participants. consider creating separate row each participant , storing them in table. joining logic easier. also, please use explicit join syntax - makes query clearer , easier understand separating join logic conditions data retrieval. remember operator and has precedence on or , event.event_no = 4 not apply each participant condition. believe mistake, 1 judge. as...