I'm using DB2 to develop an app,
I have the tables products, price and cost, these tables store products data at this way:
As you can see, for this example it is possible to have products with a price but with no cost assigned (so the row doesn't exist, it is not like a product can have cost = null).
What I want to do is to get all the ids of the products whose are assigned to a price but not to a cost, so the result should be:
I think I can't do an outer left or right join since in order to do that I'd need both tables (price and cost) to have the ids present on both of them.
I'm not pretty sure what version of DB2 I'm using (I'm pre-configured software to interact with DB2) so it would help me if you use SQL Server syntax since it is pretty alike DB2.
Could anybody help me please? :(