T-SQL 101: 141 Updating data in a SQL Server table
An UPDATE statement is the way we change data in an existing row or multiple rows of a table. In the example above, I’ve said I want to update dbo.OrderContacts; that’s the table.
I asked SQL Server to set the OrderContact column to Terry Jones, but only where the OrderID is 1. That’s how we modify values in a table.
If I needed to modify more than one column, after Terry Jones, I could just put a comma, and then I don’t have to use the word SET again.
2025-04-07