MySQL truncate 快速删库跑路操作

为了快速的删除数据库中的数据并且跑路 我们需要输入以下命令

select CONCAT('truncate TABLE ',table_schema,'.',TABLE_NAME, ';') from INFORMATION_SCHEMA.TABLES  where  table_schema in ('daname')

上面的命令会返回truncate所有表的语句 ,复制出来后执行 就能够清空所有表的数据了。

truncate TABLE activity;
truncate TABLE ad_lunbo;
truncate TABLE attributes;
truncate TABLE attributes_category;
truncate TABLE captcha_history;
truncate TABLE category;
truncate TABLE channel;
truncate TABLE comments;
truncate TABLE comments_communication;
truncate TABLE comments_info;
truncate TABLE comments_scan;
truncate TABLE common_area;
truncate TABLE consume_record;
truncate TABLE coupons;
truncate TABLE coupons_detail;
truncate TABLE day_limit;
truncate TABLE divide_storage_history;
truncate TABLE divide_storage_rule;
truncate TABLE feedback;
truncate TABLE goods;
truncate TABLE goods_activity;
truncate TABLE goods_attribute;
truncate TABLE goods_brand;
truncate TABLE goods_brand_list;
truncate TABLE goods_carts;
truncate TABLE goods_cat;
truncate TABLE goods_images;
truncate TABLE goods_purchase_history;
truncate TABLE goods_sort;
truncate TABLE goods_tags;
truncate TABLE hot_search;
truncate TABLE news_info;
truncate TABLE notice;
truncate TABLE order_goods;
truncate TABLE orders;
truncate TABLE orders_return;
truncate TABLE recharge_activity;
truncate TABLE recharge_list;
truncate TABLE score_history;
truncate TABLE score_rule;
truncate TABLE search_history;
truncate TABLE storage_check_history;
truncate TABLE store_info;
truncate TABLE supplier;
truncate TABLE transport_ways;
truncate TABLE user_account;
truncate TABLE user_address;
truncate TABLE user_balance;
truncate TABLE user_collection;
truncate TABLE user_coupons;
truncate TABLE user_info;
truncate TABLE user_login_history;
truncate TABLE user_scan;
truncate TABLE user_score_history;
truncate TABLE user_sign_history;
truncate TABLE vip;
truncate TABLE vip_ranks;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值