UPDATE Syntax

The WHERE Clause

Examples

What Happened

Example

$sth = $dbh->prepare( qq{ UPDATE title SET price = price * 0.8 WHERE price > 100 } );
$sth->execute or die "Failed to execute: $DBI::errstr\n";
$rows_updated = $sth->rows;
print "I just updated $rows_updated rows\n";

Review

Which columns in a table can be modified by the UPDATE statement?

[ ] [ Course Contents ] [ Home ] [ Curriculum ]
http://www.keller.com/dbweb/6/update.html
Updated Wednesday, 31-Oct-2001 14:17:46 CST

Copyright © 2006
Dan Keller Technical Services
4500 19th St., San Francisco
California, USA 94114
tel: 415 / 861-4500