From [Order Details]
Where ProductID NOT IN
(Nothing showed up) - Just the OrderID column, but it was blank.
Also, I looked in the database and found that every ProductID has an OrderID. So does this mean every product has been ordered. We did this in class and I know there is a tangible right answer. Any help?
Your natural English specification is not right - let's get that right then the SQL writes itself (you have the structure correct already, you've just jumbled the names up).
"Show me all the ProductID's
in the Order Details Table
That do not have a OrderID"
this does not make sense - if a Product ID is in the Order Details table then it MUST have an OrderID.
Line one is correct. Line two is wrong. Line three is wrong.
Wait, how do you know if a ProductID is in the Order Details Table it must have an OrderID? OHHHHHHHH That makes sense!!!! (Light Bulb) Because its the details about the order that was already made. Gotcha. Ok So then it should look like this:
"Show me all the OrderIDs
in the Orders Table
that are not in the OrderDetails Table"