How to delete products in heidisql

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

delete product using explorer
Delete selected rows in HeidiSQL

To delete a product in HeidiSQL, follow these steps:

  1. Connect to the database that contains the product you want to delete.
  2. 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.
  3. Select the product you want to delete by clicking on it.
  4. Right-click on the product and select “Delete” from the context menu.
  5. Confirm the delete operation by clicking “Yes” in the confirmation dialog.

2. Delete product using HeidiSQL SQL query

delete product using sql command
Delete SQL query in HeidiSQL

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.

Leave a Comment

Related Posts