DELETE TRIGGER Command Example

The following examples creates an Update trigger which prevents values greater than 50 from being entered in the maxordamt field in the customer table. DISPLAY DATABASE is used to display the Update trigger. DELETE TRIGGER is then used to remove the Update trigger, and DISPLAY DATABASE is issued again to verify the removal of the Update trigger.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')  && Open testdata database
USE CUSTOMER  && Open customer table

CREATE TRIGGER ON customer FOR UPDATE AS maxordamt <= 50
CLEAR
DISPLAY DATABASE
DELETE TRIGGER ON customer FOR UPDATE
DISPLAY DATABASE