Truncate all tables (most of which have constraints). How to temporarily drop them

后端 未结 4 1471
清酒与你
清酒与你 2021-02-02 17:59

I have a development database (MYSQL) which I would like to load with fresh data at some point. I would like to delete the content of all tables. What is the best way, as autom

4条回答
  •  迷失自我
    2021-02-02 18:23

    If you want truncate REALLY all tables better way i'm think drop and create database with previously extracted database schema. Or you just can two copy of same database - test and empty. After filling your tables, just delete test db and copy empty to test.

提交回复
热议问题