The UPDATE Query in SQL is used to update existing records in a table. If you use the WHERE clause with the Change query, you can update only the rows you want, rather than all of them.
UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition
Let's understand this by taking one example,
UPDATE Student SET Age = 21 WHERE Roll_no = 7
Hence, the age of Yashi gets updated to 21.
The number of records that will be updated is determined by the WHERE clause.
Let's understand this by taking one example,
UPDATE Student SET Age = 21 WHERE Age = 20;
Hence, the age of Riya and Yashi gets updated to 21.