Currently there are three tables:
They are: A B C
The relationship between A and B, A.uid = B.id
The relationship between B and C, B.uid = C.id
Now I want to pass When a MySQL statement directly queries table A, the information of table C can be found through table B, such as left join, etc. Please give me a demonstration sql statement, thank you
Currently there are three Table:
respectively include: A B C
The relationship between A and B, A.uid = B.id
The relationship between B and C, B.uid = C.id
Now I want to directly query A through a MySQL statement When creating a table, you can check out the information of table C through table B, such as left join, etc. Please give me a demonstration sql statement, thank you
The following is for reference only
SELECT * FROM A LEFT JOIN B ON A.uid=B.id LEFT JOIN C ON B.uid=C.id WHERE ...