Skip to Main Content

Oracle Database Discussions

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 with :new and :old for comparing values

786451Sep 6 2010 — edited Sep 6 2010
hi,
i want to use trigger with :new :old to compare old values with new ones.
i have a table employee

Name Null? Type
ENO NOT NULL NUMBER(4)
ENAME VARCHAR2(20)
SALARY NUMBER(10,2)

now i want to implement a trigger so that while inserting values in employee it will check whether
the inserting value of salary is greater than the last salary ( row ) of the table. if it fails then it will
raise an application error.
i'm unable to write this code as this is returning errors .
thanks

Edited by: user13371438 on Sep 6, 2010 3:00 AM
This post has been answered by Satish Kandi on Sep 6 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2010
Added on Sep 6 2010
11 comments
14,948 views