# Modifying Data in T-SQL

Reading data is half the story. You will add rows with INSERT, change them with UPDATE, remove them with DELETE, and use transactions as a safety net while you practice.

Updated: November 3, 2026

## [Modifying Data in T-SQL](https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/modifying-data-in-t-sql)

1. [Inserting Data](https://www.ask-codey.com/lessons/modifying-data-in-t-sql-inserting-data) (Apprentice): Add rows to a table with INSERT INTO, name the columns you fill, let identity columns number new rows, and respect the table's keys.
2. [Updating Data](https://www.ask-codey.com/lessons/modifying-data-in-t-sql-updating-data) (Apprentice): Change existing rows with UPDATE ... SET, always limited by a WHERE that you've tested first with a SELECT.
3. [Deleting Data](https://www.ask-codey.com/lessons/modifying-data-in-t-sql-deleting-data) (Apprentice): Remove rows with DELETE FROM ... WHERE, test the WHERE first, and delete in the order the foreign keys allow.
4. [Transactions](https://www.ask-codey.com/lessons/modifying-data-in-t-sql-transactions) (Apprentice): Group changes into a transaction so they all happen or none do, and use ROLLBACK as a safety net while you work.

## [Exercise: Modifying Data](https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/exercise-modifying-data-in-t-sql)

1. [Exercise: Modifying Data](https://www.ask-codey.com/lessons/exercise-modifying-data) (Apprentice): Add a category, products, yourself and a customer's order to Northwind, then update and delete them, with scripts that use variables and transactions.

Source: https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/chapters/modifying-data-in-t-sql
