Updating Data in a Table You can also change the existing data in a table with the UPDATE statement. As with the SELECT statement, you can add a WHERE clause to specify exactly which rows you want to update. If you leave out the WHERE clause, the entire table gets updated.
Here is an example to change values in your Course table using UPDATE statement mysql > UPDATE Course SET Course name = ‘Java’, Duration = ‘10’ WHERE Course id = 3; Query OK, 1 row affected mysql > SELECT * from Course; Output
3 rows in set |
||||||||||||