1 Reply Latest reply: Dec 11, 2012 3:41 AM by kikolus RSS

    Issue with Trigger on table

    user6040008
      Hi,

      I have table TEMP AS (SNO NUMBER,
      STATE VARCHAR2(50),
      UPDATE_DATE DATE)

      I want to create trigger on this table like whenever there is update in STATE of temp table UPDATE_DATE columns get updated.
      I am trying to create trigger using PRAGMA Autonomous transaction but it is not working with this and withouht PRAGMA.
      With PRAGMA I am getting error "ORA-00060: deadlock detected while waiting for resource".

      Is it possible to create trigger on this table for updating columns of same table.

      Edited by: user6040008 on Dec 11, 2012 1:08 AM
        • 1. Re: Issue with Trigger on table
          kikolus
          Hi,
          This is not valid forum for questions like that. Please use {forum:id=75} forum. However you can use following code:
           
          create or replace trigger xx 
          before update of state 
          on cabasys.temp 
          for each row 
          begin 
          :new.update_date := sysdate; 
          end; 
          Edited by: kikolus on 2012-12-11 10:40