hi

i have two tables, one is products, the other is for 'discounts' on those products... when adding a new 'discount' i want to avoid adding two discounts to a single product... so i was looking for some sort of Right Join which would exclude all products which have a match in the discount table?!

Ill be using a 'select' to choose a product to add a discount to... the query needs to output all product name without a corresponding discount entry...

any ideas?

lworks

Something like this:

select * from product where id not in (select product_id from discount)

nice one! worked great.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.