I have created the below trigger in Oracle to ensure that a value in a table remains at 180 but I need to restrict this to one row in this table. Is there a way to use an IF statement or a where clause of some type for a particular row in that table? The Row is called ADMIN. Triggers weren't covered in my course so only know a few basic statements.
CREATE OR REPLACE TRIGGER DAYSAGO_trg BEFORE UPDATE ON days_ago FOR EACH ROW BEGIN :NEW.days_ago := 180;
END;
Any help or pointers would be greatly appreciated.
... FOR EACH ROW when new.mycol = 'ADMIN' BEGIN ...
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.