Changing and Deleting Data in a Database

As I write this sentence and look up and see the quote at the top of the page which I found several weeks ago, I note that today is election day in the USA. Interesting coincidence. However, what you will learn about changing and deleting data in a database using SQL in this section will be much easier than changing politicians!

The SQL UPDATE statement is used to change the value of one or more columns in the rows of a particular table. The SQL DELETE statement can be used to delete one or more rows from a particular table. Two forms are provided for each statement. A searched update or delete contains a WHERE clause that is used to determine which rows of the table are to be updated or deleted. Searched updates and deletes are designed to be used interactively although they are also easily used in an application program. A positioned update or delete is used in conjunction with a SELECT statement that is being processed under a separate statement handle and is only used within an application program. For that reason, the discussion on positioned updates and deletes will be discussed in the Using SQL in an Application Program section.