title: Shared Primary Key
body: <p>I would guess this is a semi-common question but I can't find it in the list of past questions.  I have a set of tables for products which need to share a primary key index.  Assume something like the following:</p>
  
  <pre><code>product1_table:
      id,
      name,
      category,
      ...other fields
  
  product2_table:
      id,
      name,
      category,
      ...other fields
  
  product_to_category_table:
      product_id,
      category_id
  </code></pre>
  
  <p>Clearly it would be useful to have a shared index between the two product tables.  Note, the idea of keeping them separate is because they have largely different sets of fields beyond the basics, however they share a common categorization.</p>
  
  <p>UPDATE:</p>
  
  <p>A lot of people have suggested table inheritance (or gen-spec).  This is an option I'm aware of but given in other database systems I could share a sequence between tables I was hoping MySQL had a similar solution.  I shall assume it doesn't based on the responses.  I guess I'll have to go with table inheritance...  Thank you all.</p>