Skip to content
Skip to page content
soylai.com

Interface of Python with an SQL Database — Part 2: Changing Data and Parameterised Queries

Beta
Lesson

Changing data from Python

Part 2 — INSERT, UPDATE, DELETE, commit(), rowcount, and values from variables.

In this lesson you will

  • Insert, update and delete records from Python and save them with commit()
  • Use rowcount to find how many rows a statement changed
  • Build queries with %s placeholders and with format(), and write complete programs
Part 2 at a glance