Here is table structure:
Table Task
id(PK) name
1 Task 1
2 Task 2
Table User
id(PK) name
1 John Smith
2 Jack Will
Table Tasker
id(PK) taskId userId
1 1 1
2 1 2
3 2 1
Table task and user have one to many relationship by using Table tasker
select
T1.taskId,T1.userId,
T2.name as User_name,
T3.name as Task_name
from Tasker T1
left join User T2 on T1.userId = T2.ID
left join Task T3 on T1.taskId = T3.ID
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments