How does mysql implement multi-table query?

such as title: there is a database A, in which three tables are respectively B1), (B2 and B3 (B1 has a field C1), (B2, a field C2), (B3 and a field C3). If I want to query the contents of the fields in these three tables at the same time, how should I write the SQL statement? Find ~

Mar.24,2021

do not understand the results you want
maybe you want union/union all


suppose there is a foreign chain between them can be queried by connection
select a.C1Magneb.C2 C.C3 form B1 as a join B2 b on a.id=b.aid join B3 c on c.id=a.cid


is this field related to your three tables? If you are not using select tOne.c1,tTwo.c2,tThree.c3 from B1 tTone,B2 tTwo,B3 tThree. If you can understand the join operation of mysql, the details will not be listed, because I do not like borrowlism very much. :-D

Menu