Creates a trigger, a type of stored procedure that is often used for enforcing integrity constraints. A trigger executes automatically when a user attempts a specified data modification statement on a specified table.
create trigger [owner.]trigger_name on [owner.]table_name for {insert, update, delete} as SQL_statements
Or, using the if update clause:
create trigger [owner.]trigger_name on [owner.]table_name for {insert, update} as [if update (column_name) [{and | or} update (column_name)]...] SQL_statements [if update (column_name) [{and | or} update (column_name)]... SQL_statements]...
Usage
When a trigger is created on a proxy table, it will execute after an insert, delete or update statement on that proxy table completes. However, the special tables inserted and deleted, which normally are views into the local transaction log, will not contain any data, since changes to remote data are not logged locally.
Some direct_connects have the ability to support the special tables inserted and deleted. If this is the case, CIS will forward references to these tables when found within a trigger. The reference will be constructed as in this example:
select ... from dbname.owner.tablename inserted, dbname.owner.tablename deleted where inserted.id = deleted.id
The names for the inserted and deleted tables are passed to the direct_connect as alias names, and the table name in the from clause is the actual name of the table in the DBMS accessed by the DirectConnect.
Servers in this class do not support access to remote inserted and deleted tables.
Servers in this class do not support access to remote inserted and deleted tables.
Servers in this class do not support access to remote inserted and deleted tables.
Servers in this class do not support access to remote inserted and deleted tables.
The ability to support inserted and deleted tables is determined by a capability. If enabled, CIS will forward syntax referencing these tables to the DirectConnect.
With version 12.0, the only DirectConnect supporting this capability is the DirectConnect for Oracle.
Servers in this class do not support access to remote inserted and deleted tables.
Servers in this class do not support access to remote inserted and deleted tables.