How to delete all magento 2 order, invoice, shipment, and credit memo, and reset the increment_id too using php code?
You can use this module for deleting orders, github.com/mageplaza/magento-2-delete-orders– KorbinAug 29, 2018 at 6:08
You can check this link: titechglobal.com/…– Sukumar GoraiAug 29, 2018 at 7:31
Create Magento Module.
or Create php file in that create queries and execute using ajax button placed in admin of magento.
First find out all tables being impacted then you can easily know the SQL queries .
Try using "ALTER TABLE table_name AUTO_INCREMENT = 1;" sql query to reset auto-increment.