S
S
Sasha2942020-11-25 09:36:46
MySQL
Sasha294, 2020-11-25 09:36:46

How to organize many-to-many queries from the main table?

I have a main table, how to set a query from it to get data from table1?
5fbdfa5614398067496633.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nozzy, 2020-11-25
@Sasha294

select
t1.*,
t2.*,
t3.*
from mainTable t1
inner join mainTable_table1 t2 on t2.id_mainTable = t1.id_mainTable 
inner join table1 t3 on t3.id_table1 = t2.id_table1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question