many to many relationship mysql select
- by zeina
Let's consider 2 tables "schools" and "students". Now a student may belong to different schools in his life, and a school have many students. So this is a many to many example. A third table "links" specify the relation between student and school.
Now to query this I do the following:
Select sc.sid , -- stands for school id
st.uid, --…