Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is MySQL creating tables with a _seq suffix?

Tags:

mysql

I have created a InnoDB table named foo in MySQL. As soon as I perform an insert into the table, I see that another table foo_seq is created.

If I drop the auto generated table, it appears after the next insert.

What is causing this?

like image 517
mmattax Avatar asked Jan 28 '26 06:01

mmattax


1 Answers

That sounds like a sequence is being created, do you have any autogenerated primary keys or IDs?

like image 145
Dr. Snoopy Avatar answered Jan 29 '26 22:01

Dr. Snoopy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!