Toad World® Forums

Triggers update

Hi

I am uodating my existing trigger. while updating trigger, it is scanning my existing data to satisfy the condition.

But I am looking not to scan the existing data, but going forward run this trigger

How can I update my trigger only to validate for the upcoming data

Something like this?

if :new.column_name <> ‘acceptable_value’ then

raise your_exception;

end if;

If all you want to do is validate incoming data, then it might be better to make a constraint rather than a trigger. If you don’t want it to check the data that is already in your table, you could create the constraint with the ENABLE NOVALIDATE options.