mysql - Need to display records by joining two tables and the records should be Unique -


i have 2 tables student , taskeffort.

many students have worked on same tasks. particular task name of students , effort should considered.

the student table contains studentid, firstname , lastname.

the taskeffort table contains taskid, studentid , effort

i need display taskid, first name, last name, effort, worked on particular task.

this 1 of queries tried, not working.

select t.id, s.firstname, s.lastname, t.effort  taskeffort t  left outer join student s on t.id = 4 , s.studentid = t.studentid 

thanks in advance.

select t.id, s.firstname,s.lastname, t.effort  taskeffort t  left outer join student s on s.studentid = t.studentid  t.id = 4; 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -