Difference between revisions of "DELETE TRIGGER"

From Lianjapedia
Jump to: navigation, search
Line 4: Line 4:
 
==Syntax==
 
==Syntax==
 
DELETE TRIGGER ON [<database>!]&#060;table&#062;
 
DELETE TRIGGER ON [<database>!]&#060;table&#062;
 +
 
FOR DELETE | BEFOREDELETE | ONAFTERDELETE | INSERT | BEFOREINSERT | ONAFTERINSERT | UPDATE | BEFOREUPDATE | ONAFTERUPDATE
 
FOR DELETE | BEFOREDELETE | ONAFTERDELETE | INSERT | BEFOREINSERT | ONAFTERINSERT | UPDATE | BEFOREUPDATE | ONAFTERUPDATE
  

Revision as of 09:05, 24 October 2013

Purpose

Deletes a trigger from a table

Syntax

DELETE TRIGGER ON [<database>!]<table>

FOR DELETE | BEFOREDELETE | ONAFTERDELETE | INSERT | BEFOREINSERT | ONAFTERINSERT | UPDATE | BEFOREUPDATE | ONAFTERUPDATE

See Also

ADD TABLE, ALTER INDEX, ALTER TABLE, CONSTRAINTS, CREATE DATABASE, CREATE TRIGGER, DATA TYPES, DROP TABLE, GETENV(), INSERT, OPEN DATABASE, SELECT, SET AUTOCATALOG, SET XMLFORMAT, USE

Description

The DELETE TRIGGER command deletes a trigger from the specified table. Triggers are used to evaluate a logical expression when certain operations are attempted.

Keywords Description
database The name of the database to which the table belongs. The '!' character must be included between the database name and the table name.
table The name of the table
FOR DELETE | BEFOREDELETE | ONAFTERDELETE | INSERT | BEFOREINSERT | ONAFTERINSERT | UPDATE | BEFOREUPDATE | ONAFTERUPDATE Specifies the type of trigger to be deleted.

Example

USE accounts
CREATE TRIGGER ON customer FOR UPDATE AS not empty(CustName)
DELETE TRIGGER ON customer FOR BEFOREUPDATE