Deleting Any Order In Magento with Sql Query

Megento does not allow to delet orders created, but even sometime we nee to delete orders, for deleting particular order we must know the order id, i.e. we can get order id from magento admin section now execute sql query given below remember change your order id with increment_id.
[sql]
SET @increment_id=’43290′;
SELECT @order_id:=entity_id FROM sales_order_entity WHERE increment_id=@increment_id;
DELETE FROM sales_order_entity WHERE entity_id=@order_id OR parent_id=@order_id;
DELETE FROM sales_order WHERE increment_id=@increment_id;
[/sql]

Leave a Comment

Your email address will not be published. Required fields are marked *

*