Skip to Main Content

Oracle Forms

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!

which trigger to use to find duplicate values when enter

994122Sep 4 2014 — edited Sep 6 2014

Hi all,

    I have sample code to find duplicate values when enter, but i don't know in  which trigger to use? can you please explain and why we use in that trigger?

   DECLARE
    cnt NUMBER (5);
BEGIN
    SELECT Count (*)
    INTO   cnt
    FROM   emp
    WHERE  empno = :emp.empno;

    IF cnt > 0 THEN
      Message ('the empno is already existing ');
    ELSE
      next_item;
    END IF;
END; 


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2014
Added on Sep 4 2014
7 comments
2,280 views