OpenCart清空产品,订单,客户等数据SQL语句 - 莆田外贸 - Powered by Discuz!

莆田外贸

标题: OpenCart清空产品,订单,客户等数据SQL语句 [打印本页]

作者: admin    时间: 2016-5-25 18:46
标题: OpenCart清空产品,订单,客户等数据SQL语句
#清空产品数据,以下sql语句在opencart v1.5.6测试成功。
TRUNCATE TABLE `attribute`;
TRUNCATE TABLE `attribute_description`;
TRUNCATE TABLE `attribute_group`;
TRUNCATE TABLE `attribute_group_description`;
TRUNCATE TABLE `category`;
TRUNCATE TABLE `category_description`;
TRUNCATE TABLE `category_to_layout`;
TRUNCATE TABLE `category_to_store`;
TRUNCATE TABLE `option`;
TRUNCATE TABLE `option_description`;
TRUNCATE TABLE `option_value`;
TRUNCATE TABLE `option_value_description`;
TRUNCATE TABLE `product`;
TRUNCATE TABLE `product_attribute`;
TRUNCATE TABLE `product_description`;
TRUNCATE TABLE `product_discount`;
TRUNCATE TABLE `product_image`;
TRUNCATE TABLE `product_option`;
TRUNCATE TABLE `product_option_value`;
TRUNCATE TABLE `product_reward`;
TRUNCATE TABLE `product_special`;
TRUNCATE TABLE `product_to_category`;
TRUNCATE TABLE `product_to_download`;
TRUNCATE TABLE `product_to_layout`;
TRUNCATE TABLE `product_to_store`;
#清空订单,客户等数据
TRUNCATE `order`;
TRUNCATE `order_address_add`;
TRUNCATE `order_download`;
TRUNCATE `order_history`;
TRUNCATE `order_option`;
TRUNCATE `order_product`;
TRUNCATE `order_total`;
TRUNCATE `order_to_buyer`;
TRUNCATE `order_to_salesman`;

TRUNCATE `address`;
TRUNCATE `customer`;
TRUNCATE `customer_ip`;
TRUNCATE `customer_reward`;
TRUNCATE `customer_transaction`;






欢迎光临 莆田外贸 (http://www.ptbaixing.com/) Powered by Discuz! X3.2