# Execute: Insert, Update and Delete

Execute runs INSERT, UPDATE and DELETE and returns how many rows changed. To get a new row's id back, query it with QuerySingle&lt;int>.

![Cheat sheet: Execute: Insert, Update and Delete](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/a9fd7ede045d4fc897eb9261a69f3a0e.webp)

- Category: C#
- Level: Journeyman
- Tags: c-sharp, Execute(), SCOPE_IDENTITY, t-sql
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/dapper-execute-insert-update-and-delete-cheat-sheet
