Member-only story
Pyodbc SQL CRUD — Delete: Examples with MySQL
So far in the Pyodbc CRUD series, we’ve seen examples of how to: 1)Create new rows of data with INSERT
2)Read some data with SELECT
3)Modify existing data with UPDATE
. Rounding out the CRUD operations is perhaps the most powerful command in SQL: DELETE
. When it’s time for those rows of data to disappear, DELETE
comes in swinging, makes it happen, and doesn’t look back. It’s been said uncountable times before, but, it is always worth repeating; DELETE
completely removes data. Enough with the antics, let’s see it in action using pyodbc…
OS, Software, and DB used:
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:
- Pyodbc SQL CRUD — Create: Examples with MySQL
- Pyodbc SQL CRUD — Read: Examples with MySQL
- Pyodbc SQL CRUD — Update: Examples with MySQL
As in previous posts, I’ll use these connection handlers for the MySQL database interactions with pyodbc: