IBM Database Add-Ins for Visual Studio

Deleting Triggers That Are Associated with Tables  (DB2)

If you delete a table, the triggers that are associated with the table are not deleted from the database; they are marked inoperative. You can see the triggers that are associated with deleted tables in the DB2 Control Center (Tools > IBM DB2 Tools > DB2 Control Center).

If you want to delete the triggers that are associated with a table that you are deleting, you must delete the triggers before you delete the table.

To delete the triggers that are associated with a table:

  1. In the Server Explorer under your data connection, right-click the table that you want to delete, and then select Open Definition on the shortcut menu.
  2. With the table definition open in the IBM Table Designer, click Triggers on the IBM Table Designer toolbar.
  3. In the Triggers view, for each trigger that you want to delete, select the trigger in the Triggers list, and then click Delete Trigger.
  4. Save the table and then close the IBM Table Designer.

You can now delete the table without leaving its triggers in the database.


See Also

Deleting Procedures, Functions, or Objects from an IBM Database | Re-Creating Inoperative Triggers


.NET Development Forum   DB2 FAQs

© Copyright IBM Corporation 2002, 2019. All Rights Reserved.