Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的架构中有 300 多个表,我需要运行截断命令吗?这怎么可能我需要知道所有外键并按照依赖关系的顺序对表进行排序?
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done