I have two tables in a database one named purchases and one named items.
My problem is i’m trying to process whether an item listed in the purchases can be returned.
For instance, Person A purchases Item A, and B. Both purchases are inserted into the Purchases table. Item A, and B are listed in the Items database aswell. Items contains whether it is returnable or not. What is the most efficient way to check both what items the person has purchased and is returnable?
Thanks!
Conceptually, you’ll want to do the following:
So you’ll get the items – whether they can be returned – from the purchase which ID is 42.