EmergencyEMERGENCY? Get 24/7 Help Now!

Sharing an auto_increment value across multiple MySQL tables

 | October 4, 2010 |  Posted In: Benchmarks, Insight for Developers, MySQL

The title is SEO bait – you can’t do it. We’ve seen a few recurring patterns trying to achieve similar – and I thought I would share with you my favorite two: Option #1: Use a table to insert into, and grab the insert_id:

Option #2: Use a table with one just row:

Read More