Update col to Y set all other to N in trigger.

  • From: Ethan Post <post.ethan@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 30 Jan 2020 17:51:25 -0600

I should recall how to do this but been a while.

I need the best way to

update foo set col='Y' where pk=1;

And have a trigger automatically...

update foo set col='N' where pk !=1;

While avoid mutating table error.

This one seems hard to google the answer to.

Thanks,
Ethan
e-t-h-a-n.com
@poststop

Other related posts: