For these tables here (circled)
https://i.stack.imgur.com/zDx8X.jpg
What would the best join be to use for them , I tried using OUTER join but it would not return any rows even if there was matching data.
Thanks
QUERY
select *
from
hr
OUTER JOIN
hr
ON
hr.procedure_id = procedure.procedure_id
OUTER JOIN
staff
ON
staff.staff_id = hr.staff_id
Where hr.procedure_id = procedure.procedure_id
What you probably want is this:
That will give you results unless there are no rows in procedure.
There are different ways that you could put these together, though, depending on what exactly you want. I don’t know what “hr” stands for here, so I can’t use common sense to figure that out.