Member-only story
Pyodbc SQL CRUD — Update: Examples with MySQL
Likely, some of the data you store will remain unchanged. Yet, the majority of it changes rapidly depending on its nature and the purpose it serves. How do you modify data already present in your tables? We know that to CREATE
new rows of data in a table, we employ INSERT
, and to see the data on hand, SELECT
is there. However, to change it, that is the job of the UPDATE
command. Keep reading to see a couple of simple examples using the pyodbc Python driver…
OS, Software, and DB used:
- OpenSuse Leap 15.1
- MySQL 8.0.18
- pyodbc 4.0.28
Self-Promotion:
If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!
Pyodbc CRUD Series
Visit other posts that are part of the Pyodbc CRUD series:
In this post, I will use a fictitious ‘friends’ table for the examples. The structure and present data are shown below:
MySQL localhost:33060+ ssl…