&nbps;Home ✈️ Travel ⚾ Baseball 🛠 Tech 📘 Language 👨🏻 Politics About Y Generation  ðŸ˜ˆ
/ tech-note

How to update any cells in MySQL?

I forgot about it so, so frequently that I decided to jot down the syntax.

For example, to make all the posts unpublished in Ghost:

update posts set status = "draft";

Or if you want to add the condition:

update posts set status = "draft" where author_id = "1";

Source: https://stackoverflow.com/a/3024567/2360798

How to update any cells in MySQL?
Share this