MySQL Shell CRUD with Python: Read — with examples
In MySQL Shell CRUD with Python: Create — with examples, I visited the insert()
method, demonstrating how simple it is to add new rows of data to a table using Python in the MySQL Shell. Now that the data is stored, if we want to retrieve any of it – for reading – we need to SELECT
it, right? Luckily, there is a select()
method available we can use in Python mode in the shell, making this operation relatively simple. But, as simple as it is, the power lies in the combinations of other similar class methods used for filtering. Interested? Keep reading…
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!
The focus for this post utilizes several of the TableSelect
class methods.
Here is a description of the table used for these examples, which stores walking metrics data I keep up with as I work towards better health and a more manageable weight:
MySQL localhost:33060+ ssl walking SQL >
+ — — — — — — — + — — — — — — — + — — — + — — -+ — — —…