Skip to content
Advertisement

How can I reset an MySQL AutoIncrement using a MAX value from another table?

I know this won’t work. I tried it in various forms and failed all times. What is the simplest way to achieve the following result?

This is great for automation projects.

Advertisement

Answer

Use a prepared statement:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement