Auto-increment is not resetting in MySQL

后端 未结 8 1460
花落未央
花落未央 2020-12-03 17:53

I am trying to set up a script to generate a particular set of test data into my database, at the beginning of which I want to clear the tables concerned without dropping co

8条回答
  •  借酒劲吻你
    2020-12-03 18:13

    I'm sure this has been long answered but when i need to truncate and can't I just do a set foreign_key_checks = 0 then run my truncate and then set foreign_key_checks = 1.

提交回复
热议问题