Removes a Delete, Insert, or Update trigger for a table from the current database.
DELETE TRIGGER ON TableName FOR DELETE | INSERT | UPDATE |
Parameters
- TableName
- Specifies the name of table for which the trigger is deleted.
- FOR DELETE | INSERT | UPDATE
- Specifies the trigger to delete. Include FOR DELETE to remove the Delete trigger, FOR INSERT to remove the Insert trigger, and FOR UPDATE to remove the Update trigger.
Remarks
Use CREATE TRIGGER to create a Delete, Insert, or Update trigger for a table.
Example
The following example 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.
В | Copy Code |
---|---|
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 |