UPDATE is used to modify an existing record. If you have a record in your database, with a person’s name, for instance, and that person’s name changes, you can use an UPDATE statement to modify the name in the table.
UPDATE table_name SET lastname=’Smith’ WHERE lastname=’Michalski’;
Obviously, this appendix doesn’t cover all the SQL statements and all their options, but we’ve covered the ones that make up the vast majority of actual SQL queries that you’d need to run. The statements discussed here are those you will come across most of the time when working with Perl on a MySQL database.
The documentation at http://www.mysql.com is an up-to-date, valuable resource for working with MySQL databases. The site contains exhaustive documentation on every aspect of MySQL, including a complete SQL reference.