If you are a developer working in a MySQL environment, this blog post is for you. I share 3 MySQL commands or statements that you should know. That is a bold statement, I know. Turns out, once you do know (of) these commands, you will use them all the time. They minimize guesswork which leads to better productivity in other facets of your programming and querying workflow. I use them myself almost daily and am sure you will too once you see how simple they are to use. So why should you know them? Continue reading and find out…
[Keep reading for more MySQL database and Python/PHP-centric content >>>]open
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…