Is it possible to access ORA_ROWSCN
pseudo-column in the body of BEFORE
triggers? I'm thinking about storing this value in the table itself to emulate SQLServer rowversion
behaviour.
Accessing ORA_ROWSCN in the triggers body
oracletrigger
Related Question
- Sql-server – Performance of SQL Server Triggers
- Mysql – Trouble with triggers and insert .. on duplicate key update
- Accessing the insert statement which triggers a trigger inside the trigger’s body
- Sql-server – After update triggers that deal with multi-row updates
- Sql-server – Table data transfer using SSIS and triggers on destination table
- MySQL Local Variable Scope and Triggers
Best Answer
It doesn't seem to be possible (even if Oracle itself populates the value before launching BEFORE UPDATE trigger) - referring to
:NEW.ora_rowscn
in the trigger body generates error,select ora_rowscn from table1 in the trigger
causes mutating trigger error.