Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Thanks for contributing your answer :-) incidentally, why can't you just use ora_rowscn - why do you need to store it again in the table? – Jack Douglas Dec 22 '11 at 20:47
@ Jack Douglas: I tried to store ora_rowscn in the table as a separate column (similar to how SQLServer's rowversionworks, so I don't need to change queries that use this feature while migrating from one RDMS to another). – a1ex07 Dec 22 '11 at 20:52
I understand. You know about rowdependencies of course? – Jack Douglas Dec 22 '11 at 21:34
Yeah, I know that to have a row version, not a block version , table should be created with rowdependencies – a1ex07 Dec 22 '11 at 22:20
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.