I have two tables as below:
Students table
work table:
My query is:
select stud_name
from students
inner join work on work.library=students.stud_id
where work_id=2
It returns name of student correctly. But please tell me is it possible to retrieve two students name via inner join . Example : get RON and JACK name as the out put in a single result set.
I tried:
select stud_name,stud_name
from students
inner join work on work.library=students.stud_id,work.sports=students.stud_id
where work_id=2
But as expected I got a massive error.