O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying Data

You use the SQL UPDATE statement to update one or more columns. This usually involves specifying the following:

  • The table containing the data you want to update.

  • The column or columns you want to update, preceded by the SET keyword. If you specify more than one item, each must be separated by a comma.

  • An optional WHERE clause to specify which rows to update. If no WHERE clause is provided, all rows are updated.

Try updating a row. Enter the following SQL statement (ensuring that the ID number used in the WHERE clause is the DirectorID you noted earlier).

UPDATE Directors
SET FirstName='Ben'
WHERE DirectorID = 14

Click Execute to perform the update. Again, no results will be displayed, as UPDATE doesn’t return data (although the SQL, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required