Database Reference
In-Depth Information
20
Updating and Deleting Data
In this chapter, you learn how to use the UPDATE and DELETE statements to
enable you to further manipulate your table data.
Updating Data
To update (modify) data in a table the UPDATE statement is used. UPDATE can
be used in two ways:
To update specific rows in a table
To update all rows in a table
Let's take a look at each of these uses.
Caution
Don't Omit the WHERE Clause Special care must be exercised when using UPDATE
because it is all too easy to mistakenly update every row in your table. Please read this
entire section on UPDATE before using this statement.
Tip
UPDATE and Security Use of the UPDATE statement can be restricted and con-
trolled. More on this in Chapter 28, “Managing Security.”
The UPDATE statement is easy to use—some would say too easy. The basic
format of an UPDATE statement is made up of three parts:
The table to be updated
The column names and their new values
The filter condition that determines which rows should be updated
 
 
 
Search WWH ::




Custom Search