How to update data in an sql table?

Example:

-- Incorrectly attempting to update data without a WHERE clause
UPDATE customers SET age = 26;
Solution:

-- Correctly updating data with a WHERE clause
UPDATE customers SET age = 26 WHERE name = 'John Doe';
The UPDATE statement changes existing data in a table. Using the WHERE clause ensures that only the desired rows are updated.

Beginner's Guide to SQL