Update Data

To UPDATE an individual field for a specific record:

mysql> UPDATE Students SET Town = ‘Manch’ WHERE Town = ‘Manc’ ;
Query OK, 1 row affected (0.05 sec)
Rows matched: 1 Changed: 1 Warnings: 0

 

To UPDATE an entire field for all records:

mysql> UPDATE Students SET Town = UPPER(Town);
Query OK, 8 rows affected (0.06 sec)
Rows matched: 8 Changed: 8 Warnings: 0

Leave a Reply