Difference between revisions of "DELETE TRIGGER"

From Lianjapedia
Jump to: navigation, search
m (1 revision: SQL)
 
(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>!]&#060;table&#062;
 
DELETE TRIGGER ON [<database>!]&#060;table&#062;
FOR UPDATE | INSERT | DELETE
 
  
 +
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]], [[DB_DATADIR]], [[DROP TABLE]], [[GETENV()]], [[SQL INSERT|INSERT]], [[OPEN DATABASE]], [[SQL SELECT|SELECT]], [[SET AUTOCATALOG]], [[SET XMLFORMAT]], [[SQL USE|USE]]  
+
[[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.  Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database.  Operating System file protection can be applied individually to the files for added security.  The directory is a sub-directory of the Recital data directory.  The environment variable / symbol DB_DATADIR points to the current Recital data directory and can be queried using the GETENV() function.  Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality.  The '!' character must be included between the database name and the table name.
+
|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 | INSERT | DELETE||Specifies the type of trigger to be deleted.
+
|FOR DELETE &#124; BEFOREDELETE &#124; ONAFTERDELETE &#124; INSERT &#124; BEFOREINSERT &#124; ONAFTERINSERT &#124; UPDATE &#124; BEFOREUPDATE &#124; 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 UPDATE
+
DELETE TRIGGER ON customer FOR BEFOREUPDATE
 
</code>
 
</code>
 
+
 
+
==Products==
+
Recital Server, Recital
+
 
[[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

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