Real beginner’s question I know. Really need an answer ASAP please
Very standard situation: I have three tables which make up a many-to-many relationship. Table_1 and Table_2 contain the main data. Table_3 contains foreign keys from Table_1 and Table_2 linking them.
I’m after a SELECT command which selects all Table_1 rows which have links to particular value (say ‘3’) in Table_2.
command in English:
select all Table_1 rows which have a Table_2 ref of 3
Table_1
ref int primary key
....
....
Table_2
ref int primary key
....
....
Table_3
ref int primary key
table_1_ref int foreign key to table 1
table_2_ref int foreign key to table 2
thanks in advance