Hello everyone,
I've been looking around to solve my problem. I even went and recovered my old class note about SQL but haven't found anything. And yet I know it's kinda simple... but I just don't remember clearly.
In the scheme below, I want to fetch all the info in Table3 for all the Tiers that has the AppID in Table2. There could be more than 1 Tier using the AppID. I don't know if I'm clear though.
Here's my failing attempt...
Thanks in advance.
I've been looking around to solve my problem. I even went and recovered my old class note about SQL but haven't found anything. And yet I know it's kinda simple... but I just don't remember clearly.
In the scheme below, I want to fetch all the info in Table3 for all the Tiers that has the AppID in Table2. There could be more than 1 Tier using the AppID. I don't know if I'm clear though.
Code:
Table1 Table2 Table3
[COLOR=blue]AppID (PK)[/COLOR] _ AutoNb (PK) AutoNB
Name \ [COLOR=red]Tier (FK)[/COLOR] ---_ Name
- [COLOR=blue]AppID (FK)[/COLOR] \_ [COLOR=red]Tier (PK)[/COLOR]
Here's my failing attempt...
Code:
SELECT Table3.*
FROM Table3
WHERE Table3.Tier = (SELECT AppID
FROM Table1
WHERE Table1.AppID = 2002);
Thanks in advance.
Last edited: