先创建一张和源表无关的新表,然后通过重命名和删表操作交换两张表;   

如果需要重建user,则可以像创建user_new,然后填充好数据,最后和真实表切换

    drop table if exists user_new,user_old

    create table user_new like user 

    raname table user to user_old,user_new to user

相关文章:

  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-06-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-11-20
  • 2021-07-22
  • 2021-09-16
相关资源
相似解决方案