Member-only story
MySQL Shell CRUD With Python: Update — with examples
Using MySQL Shell in Python mode to CREATE
and SELECT
records are straight-forward processes using the insert()
and select()
methods respectively. However, we are fully aware that seldom is the case in which some of that data does not change. So how do we modify or change the data we have on-hand? In SQL, UPDATE
takes care of that. We can also apply the same UPDATE
command in MySQL Shell Python mode with the update()
method. Just as in SQL, you use the SET
clause, so too do you use it with update()
by way of the set()
method. Keep reading to see examples of these methods combined with the where()
method for specific, targeted updates…
OS, Software, and DB used:
- OpenSuse Leap 15.1
- MySQL 8.0.19
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!
First time reading this series on MySQL Shell CRUD with Python? Visit the 2 previous posts to get up to speed: