sql query

rjhe22

Well-known member
Joined
May 22, 2008
Messages
88
Programming Experience
Beginner
im tryin to run a query was wondering if anyone could help.
have two tables with productID one table has the id of all the product i have
the other table has a list of the productid were i have prices in for them. i need to find the ids of the one that have no prices in for them
can anyone help
 
VB.NET:
Expand Collapse Copy
Select * from Product
where not exists ( select 1 from ProductPrice  pp where pp.productid = product.id)

It would return you all those products which doesn't have a price.

I am assuming your first table to be Product and the second one to be ProductPrice.
 
Back
Top