Member-only story

Pyodbc SQL CRUD — Update: Examples with MySQL

Josh Otwell
7 min readJan 29, 2020

--

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…

Photo by Kat Yukawa on Unsplash

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…

--

--

Josh Otwell
Josh Otwell

Written by Josh Otwell

SQL/PHP | Photography | Technical Consultant. Sign-up for my free developer newsletter, OpenLampTech, here: openlamptech.substack.com

No responses yet