In SQL, it’s not unusual to see subqueries in SELECT statements, where they can help narrow down the results based on a complex condition.
But the SELECT statement isn’t the only place we can put a subquery.
We can use subqueries in an UPDATE statement, and we can update multiple rows too, if required.
In this article, we look at how to update multiple columns by using a SQL subquery in the UPDATE statement.