Is there a way to disable a trigger in the middle of a script or a program before executing a certain query and enabling it after the query takes place? For example, updating a "status field" to disable before and to enable after.
SHOULD you do it? Probably not. A trigger is usually implemented to ensure data integrity. Bypassing this trigger may mess up the data in your database.
I did that and I got this error:
ERROR at line 25:
ORA-06550: line 25, column 2:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
begin declare exit for goto if loop mod null pragma raise
return select update while <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall
<a single-quoted SQL string>