开发者

Why is MySQL creating tables with a _seq suffix?

开发者 https://www.devze.com 2023-01-18 16:56 出处:网络
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_se开发者_Python百科q is created.

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_se开发者_Python百科q is created.

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

What is causing this?


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


Issue this query, chances are very high it will tell you what happens before an insert:

SHOW TRIGGERS LIKE 'foo';
0

精彩评论

暂无评论...
验证码 换一张
取 消