Oracle Tutorial

Update Statement Examples

Example 1

UPDATE customers
SET city = 'LONDON'
WHERE customer_id = 1 ;

Example 2

UPDATE customers c
SET c.name = upper(c.name),
c.city = upper(c.city)
WHERE c.customer_id =
(SELECT s.customer_id
FROM sales s
WHERE s.customer_id = c.customer_id
AND s.amount >= 1200
);