Ensure in many-to-many relationship at least one relationship is primary

Posted by Anthony on Stack Overflow See other posts from Stack Overflow or by Anthony
Published on 2010-06-07T02:27:40Z Indexed on 2010/06/07 2:32 UTC
Read the original article Hit count: 329

Filed under:
|

Sorry for the bad title, if you can think of a better one, let me know.

Many-to-many relationship using tables.

  • Product
  • ProductCategory
  • Category

In the ProductCategory table i have boolean column primarycategory

Each product must have a primary category.

I want to find all products in my database which don't have a primarycategory.

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server