So far you've only read data. Real applications also need to change it. This module covers the statements that write to a database: INSERT to add new rows, UPDATE to change existing ones, and DELETE to remove them.
You'll learn to target the right rows with WHERE — and why forgetting it on an UPDATE or DELETE is one of the most costly mistakes in SQL — along with upserts (insert a row, or update it if it already exists) and bulk loading data from files such as CSVs.
Changes can fail halfway or collide with other users, which is what the next module on transactions is for. Work through these lessons in order, then continue on to Transactions & Concurrency.
A quick overview of the four core statements, showing how reading and writing data fit together.
Explains how each of the three data-changing statements works, with examples you can follow.
A closer look at changing and removing existing records, including how to target specific rows.
A hands-on walkthrough using SQLite, a lightweight database that's easy to practice with locally.
Creating a table and loading data into it from a CSV file, a common first step when working with real datasets.
Shows how to import a CSV file into a SQL Server table in one statement using BULK INSERT.