Delete Example - SQL Delete.

Community Help: DB2 Delete - Code example of a DB2 Delete Statement

Share your own experience     View front page

The following is a DB2 delete example. This is an example of how to delete from a table named "YOURTABLE", where the condition is based on a column equaling a specific value.

Although this sample is a mainframe DB2 SQL example, it really doesn't matter where you are running as this is pretty much the same everywhere.

EXEC SQL
  DELETE FROM YOURTABLE
  WHERE COLA = :WS-COLA
END-EXEC