Handling a parameterized UPDATE or DELETE statement

The way to determine the input parameters in the WHERE clause of a DELETE or UPDATE statement is similar to the way to determine them in the WHERE clause of a SELECT statement. The major differences between these two types of dynamic parameterized statements are as follows:
  • You do not need to use a cursor to handle a DELETE or UPDATE statement. You provide the parameter values from an sqlda structure with the USING DESCRIPTOR clause of the EXECUTE statement instead of with the OPEN statement.
  • You can use the DESCRIBE...INTO statement to determine if the DELETE or UPDATE statement has a WHERE clause.