Answer the question
In order to leave comments, you need to log in
How to organize a query with multiple joins through spanning tables?
There is such a scheme. How to get a user with all third children first, second,?
You need the most productive option.
Answer the question
In order to leave comments, you need to log in
in T-Sql. If data in other tables is optional, then Left, else INNER
SELECT *
FROM users as u
LEFT JOIN first as f ON f.users_id=u.id
LEFT JOIN first_second as fs ON f.id=fs.first_Id
LEFT JOIN second as s ON s.id=fs.second_Id
LEFT JOIN second_third as st ON st.second_Id=s.id
LEFT JOIN third as t ON st.third_Id=t.id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question