Updating data in tables

Updating data in multiple columns

We have the students table again. Let’s say we decide to enroll all students who have scored more than 80 marks in the Ruby course, and promote all of them to grade 12.

To solve this, the UPDATE statement can also be used to update multiple columns.

To update multiple columns, we simply need to add multiple expressions to the SET list, separated by ,.