{"id":180,"date":"2018-07-01T21:12:44","date_gmt":"2018-07-01T15:42:44","guid":{"rendered":"https:\/\/pynative.com\/?p=180"},"modified":"2021-03-09T11:03:40","modified_gmt":"2021-03-09T05:33:40","slug":"python-mysql-update-data","status":"publish","type":"post","link":"https:\/\/pynative.com\/python-mysql-update-data\/","title":{"rendered":"Python Update MySQL Table"},"content":{"rendered":"\n
This article demonstrates how to execute a MySQL UPDATE query from Python<\/strong> to modify the MySQL table’s data.<\/p>\n\n\n\n Goals of this lesson. You\u2019ll learn the following MySQL UPDATE operations from Python using a ‘MySQL Connector’ module.<\/p>\n\n\n\n Further Reading<\/strong>:<\/p>\n\n\n\n Before executing the following program, make sure you have the following in place \u2212<\/p>\n\n\n\n For this article, I am using a Laptop<\/strong> 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.<\/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 UPDATE operations.<\/p>\n<\/div>\n\n\n\nTable of contents<\/h2>
Prerequisite<\/h2>\n\n\n\n