There are two ways you can delete product data rows from the database in the Heidi SQL tool. Either by using the user database table explored interface or by executing the ‘DELETE’ SQL command for a specific product.
1. Delete product from HeidiSQL table explorer
To delete a product in HeidiSQL, follow these steps:
- Connect to the database that contains the product you want to delete.
- Navigate to the table that contains the product. You can find the table by expanding the tree in the left pane of the HeidiSQL window.
- Select the product you want to delete by clicking on it.
- Right-click on the product and select “Delete” from the context menu.
- Confirm the delete operation by clicking “Yes” in the confirmation dialog.
2. Delete product using HeidiSQL SQL query
Alternatively, you can use the following SQL command to delete a product:
DELETE FROM `dbname`.`table_name` WHERE condition;
Replace “table_name” with the name of the table that contains the product, and replace “condition” with a condition that identifies the product. For example:
DELETE FROM `test`.`product` WHERE `id`=2;
This would delete the product with an ID of 2 from the “products” table.
HeidiSQL provides an easy way to access, explore and work on database tables. Once you learn to use the HeidiSQL tool quick database activity will become easier for you. You can easily create, insert, alter or delete product data in HeidiSQL.