{"id":182,"date":"2018-07-01T21:15:14","date_gmt":"2018-07-01T15:45:14","guid":{"rendered":"https:\/\/pynative.com\/?p=182"},"modified":"2021-03-09T11:02:57","modified_gmt":"2021-03-09T05:32:57","slug":"python-mysql-delete-data","status":"publish","type":"post","link":"https:\/\/pynative.com\/python-mysql-delete-data\/","title":{"rendered":"Python Delete data from MySQL Table"},"content":{"rendered":"\n
This lesson demonstrates how to execute the SQL DELETE query from Python<\/strong> to delete data from a MySQL database table. <\/p>\n\n\n\n After reading this article, you will able to delete single, multiple, and all rows, as well as delete a single column and multiple columns from the MySQL table using Python<\/p>\n\n\n\n Further Reading<\/strong>:<\/p>\n\n\n\n Before moving further, Please make sure you have the following in place: \u2013<\/p>\n\n\n\n To perform a delete operation, I am using a Laptop table present in my MySQL server.<\/p>\n\n\n\n If a table is not present in your MySQL server, you can refer to our article to create a MySQL table from Python<\/a>.<\/p>\n\n\n\n You can also download a SQL query file<\/a>, which contains SQL queries for table creation and data so that you can use this table for your INSERT operations.<\/p>\n<\/div>\n\n\n\nTable of contents<\/h2>
Prerequisites<\/h2>\n\n\n\n