Oracle Trigger to persist value
Posted
by Jose Jose
on Stack Overflow
See other posts from Stack Overflow
or by Jose Jose
Published on 2010-04-09T18:55:43Z
Indexed on
2010/04/09
19:13 UTC
Read the original article
Hit count: 605
I have a column that I need to be able to guarantee never gets set to anything other than "N" - I thought a trigger would be the perfect solution for this, but I can't seem to figure out how to make it so that anytime the column gets set to something other than "N" I reset it back to "N"
Any pointers?
EDIT: I wouldn't want to do a constraint because the application that will potentially change it to Y is outside of my control and I don't want it to be getting errors when it sets it to Y, I just want to passively set it back to N without fanfare.
© Stack Overflow or respective owner