Contents Index ALTER TABLE statement ALTER VIEW statement

ASA SQL Reference
  SQL Statements

ALTER TRIGGER statement


Description 

Use this statement to replace a trigger definition with a modified version.

You must include the entire new trigger definition in the ALTER TRIGGER statement.

Syntax 1 

ALTER TRIGGER trigger-name trigger-definition

trigger-definition :
CREATE TRIGGER syntax following the trigger name

Syntax 2 

ALTER TRIGGER trigger-name ON [owner.table-name SET HIDDEN

Usage 

Syntax 1    The ALTER TRIGGER statement is identical in syntax to the CREATE TRIGGER statement except for the first word. For information on trigger-definition, see CREATE TRIGGER statement and CREATE TRIGGER statement [T-SQL].

Either the Transact-SQL or Watcom-SQL form of the CREATE TRIGGER syntax can be used.

Syntax 2    You can use SET HIDDEN to scramble the definition of the associated trigger and cause it to become unreadable. The trigger can be unloaded and reloaded into other databases.

This setting is irreversible. If you will need the original source again, you must maintain it outside the database.

If SET HIDDEN is used, debugging using the stored procedure debugger will not show the trigger definition, nor will it be available through procedure profiling.

Permissions 

Must be the owner of the table on which the trigger is defined, or be DBA, or have ALTER permissions on the table and have RESOURCE authority.

Side effects 

Automatic commit.

See also 

CREATE TRIGGER statement

CREATE TRIGGER statement [T-SQL]

DROP statement

Hiding the contents of procedures, functions, triggers and views

Standards and compatibility 

Contents Index ALTER TABLE statement ALTER VIEW statement