DROP TRIGGER
(lang_droptrigger.html)
The DROP TRIGGER statement removes a trigger created by the
CREATE TRIGGER statement. Once removed, the trigger definition is no
longer present in the sqlite_schema (or sqlite_temp_schema) table and is
not fired by any subsequent INSERT, UPDATE or DELETE statements ...
|
CREATE TRIGGER
(lang_createtrigger.html)
... are not supported
directly by statements inside of triggers but may be embedded within
sub-selects used by statements inside of triggers.
3. INSTEAD OF triggers
BEFORE and AFTER triggers work only on ordinary tables.
INSTEAD OF triggers work only ...
|
C API: Count The Number Of Rows Modified
(c3ref/changes.html)
sqlite3_changes(), sqlite3_changes64()
... Before entering a trigger program the value returned by
sqlite3_changes() function is saved. After the trigger program
has finished, the original value is restored.
Within a trigger program each INSERT, UPDATE and DELETE
statement sets the value returned by sqlite3_changes ...
|
Automatic Undo/Redo With SQLite
(undoredo.html)
Automatic Undo/Redo Using SQLite
This page demonstrates how to use triggers to implement undo/redo
logic for an application that uses SQLite as its
application file format.
Object-Oriented Design
This design note considers the database to be a ...
|
SQL Features That SQLite Does Not Implement
(omitted.html)
... Complete trigger support
FOR EACH ROW triggers are supported but not FOR EACH STATEMENT
triggers.
Writing to VIEWs
VIEWs in SQLite are read-only. You may not execute a DELETE, INSERT, or
UPDATE statement on a view. But ...
|
DELETE
(lang_delete.html)
... Restrictions on DELETE Statements Within CREATE TRIGGER
The following restrictions apply to DELETE statements that occur within the
body of a CREATE TRIGGER statement:
The table-name specified as part of a
DELETE statement within
a trigger body must be ...
|
The Schema Table
(schematab.html)
3. Interpretation Of The Schema Table
... For a trigger, the tbl_name
column stores the name of the table or view that causes the trigger
to fire.
rootpage
The sqlite_schema.rootpage column stores the page number of the root
b-tree page for tables and indexes. For ...
|
DROP TABLE
(lang_droptable.html)
... Any triggers attached to the table are
dropped from the database schema before the implicit DELETE FROM
is executed, so this cannot cause any triggers to fire. By contrast, an
implicit DELETE FROM does cause any configured
foreign key actions ...
|
C API: Deprecated Tracing And Profiling Functions
(c3ref/profile.html)
sqlite3_trace(), sqlite3_profile()
... Additional sqlite3_trace() callbacks might occur
as each triggered subprogram is entered. The callbacks for triggers
contain a UTF-8 SQL comment that identifies the trigger.
The SQLITE_TRACE_SIZE_LIMIT compile-time option can be used to limit
the length of bound parameter ...
|
The Bytecode() And Tables_Used() Table-Valued Functions
(bytecodevtab.html)
2.1. Schema
... The "subprog" field
is NULL for the main body of the prepared statement, or is the trigger
name or the string "(FK)" for triggers and foreign key actions.
The schema for the tables_used table is:
CREATE TABLE tables_used(
type TEXT ...
|
Page generated by FTS5 in about 53.81 ms.