Difference between revisions of "DELETE TRIGGER"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision: SQL) |
Barrymavin (Talk | contribs) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Deletes a trigger from a table | Deletes a trigger from a table | ||
− | |||
==Syntax== | ==Syntax== | ||
DELETE TRIGGER ON [<database>!]<table> | DELETE TRIGGER ON [<database>!]<table> | ||
− | |||
+ | FOR DELETE | BEFOREDELETE | ONAFTERDELETE | INSERT | BEFOREINSERT | ONAFTERINSERT | UPDATE | BEFOREUPDATE | ONAFTERUPDATE | ||
==See Also== | ==See Also== | ||
− | [[ADD TABLE]], [[ALTER INDEX]], [[ALTER TABLE]], [[SQL Constraints|CONSTRAINTS]], [[CREATE DATABASE]], [[CREATE TRIGGER]], [[SQL Data Types|DATA TYPES | + | [[ADD TABLE]], [[ALTER INDEX]], [[ALTER TABLE]], [[SQL Constraints|CONSTRAINTS]], [[CREATE DATABASE]], [[CREATE TRIGGER]], [[SQL Data Types|DATA TYPES]], [[DROP TABLE]], [[GETENV()]], [[SQL INSERT|INSERT]], [[OPEN DATABASE]], [[SQL SELECT|SELECT]], [[SET AUTOCATALOG]], [[SET XMLFORMAT]], [[SQL USE|USE]] |
− | + | ||
==Description== | ==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. | The DELETE TRIGGER command deletes a trigger from the specified table. Triggers are used to evaluate a logical expression when certain operations are attempted. | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | !width="30%"|Keywords||Description |
− | !Keywords||Description | + | |
|- | |- | ||
− | |database||The name of the database to which the table belongs | + | |valign="top"|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 | |table||The name of the table | ||
|- | |- | ||
− | |FOR UPDATE | | + | |FOR DELETE | BEFOREDELETE | ONAFTERDELETE | INSERT | BEFOREINSERT | ONAFTERINSERT | UPDATE | BEFOREUPDATE | ONAFTERUPDATE||valign="top"|Specifies the type of trigger to be deleted. |
|- | |- | ||
|} | |} | ||
− | |||
==Example== | ==Example== | ||
Line 32: | Line 28: | ||
USE accounts | USE accounts | ||
CREATE TRIGGER ON customer FOR UPDATE AS not empty(CustName) | CREATE TRIGGER ON customer FOR UPDATE AS not empty(CustName) | ||
− | DELETE TRIGGER ON customer FOR | + | DELETE TRIGGER ON customer FOR BEFOREUPDATE |
</code> | </code> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category:Triggers]] | + | [[Category:Databases]] |
+ | [[Category:Lianja VFP Extensions]] | ||
+ | [[Category:VFP Command Extensions]] | ||
+ | [[Category:Database Triggers]] |
Latest revision as of 04:38, 15 December 2017
Contents
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