1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

trigger in oracle/ SQL DEVELOPER

Discussion in 'General' started by monkey, Apr 22, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Can trigger in oracle contain select or any other command that commes AFTER end trigger_name?

    If it does, does it disturb executing?
    How do we set trger in motion?
    Is it automattical, or do we have to do sth particular IN SQL DEVELOPER?

    Many thanks!!
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
  3. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Hi,

    Ans: No

    Ans: Yes in Sql developer it will disturb.
     
  4. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    I ment like this:

    Code (SQL):

    CREATE TRIGGER t1 after UPDATE OF surname ON m WHEN (OLD.idm=1)
    BEGIN
    UPDATE m
    NEW.mname='trigger1';
    END t1;

    UPDATE m
    SET msurname='SURNAME_UPDATED'
    WHERE imd=1;
     
    Can this update be in same sql file as the trigger? (of course, it is after the after part, but in did not thin IN that line ,in ment after, but in this file...)

    MANY THANKS!!!
     
  5. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    It is the incorrect trigger
    http://www.techonthenet.com/oracle/triggers/after_update.php