# Changing Rows: UPDATE and DELETE

UPDATE changes the columns SET names and DELETE removes rows, each only in the rows its WHERE picks, rowcount says how many rows that was so an API can tell a change from a missing row, and a with block commits changes that belong together or rolls them all back.

![Cheat sheet: Changing Rows: UPDATE and DELETE](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/cea1a61938d14908a6385279f7e8e91f.webp)

- Category: FastAPI
- Level: Apprentice
- Tags: database, DELETE, ROLLBACK, sql, sqlite, Transaction, UPDATE
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-sql-update-and-delete-cheat-sheet
