Updating multiple rows in oracle
Finally, the WHERE clause is outside the subquery to only update the product_id of 1, as it applies to UPDATE rather than to the subquery.
Using the data from the previous example (the product table), the company wants to deactivate all the products that have not had an order placed for them.
Our statement would look like this: You can see that the SET clause includes a subquery, which finds the MAX value of the price column in the product table and multiplies it by 1.2 to add 20%.
For example, 60,000 customers need their arrival_time to match their departure_time.
I understand that I can do this with one row and it work with a nested select statement in an update statement.
You will be given questions that you need to solve.
After each exercise, we provide the solution so you can check your answer.