Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger to update

user12210196Aug 5 2015 — edited Aug 7 2015

I was looking for some simple logic of a trigger to update values of a cloumn to something based on a entry value of a row in the same column. Example: When someone sets the status column to to active for one record, rest of the values should automatically get updated with inactive status. There can be only one record with active status, and everything should become inactive when you make any one record active.

The biggest problem is mutating errors..

day, status

SUN,Inactive

MON,Active

TUE,Inactive

WED,Active

THUActive

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2015
Added on Aug 5 2015
22 comments
1,541 views