Search⌘ K
AI Features

Update Rows on a Table

Understand how to use the SQL update statement to modify data in specific rows of a MySQL table. Learn to apply the set and where clauses correctly, and recognize the importance of caution when updating data without filters.

We'll cover the following...

Let’s change the value of an attribute for a specific customer now. We’ll use the update command. For example, if we want to change the name of Maria Foo to Maria Moo, then we give the following command:

MySQL
update customers set name = 'Maria Moo' where id = 3;

Executing the above query results in the following output:

1 mysql> update customers set name = 'Maria Moo' where id = 3;
2 Query OK,
...