Trigger updating same table oracle

I am able to get the columns with: declare cursor c_cur is select column_name from user_tab_columns where table_name = 'EMP_MAS'; begin for i in c_cur loop variable := i.column_name; end; --- But here I want the column value also...? if I use variable := ':new.' trigger updating same table oracle-60

Now, When user u1 try to insert/update/delete from table T1, Should Trigger fire or not? Krishna Kumar Hi Tom Kindly help me out 1) Trigger T1 is created by user U1 against a table T1 and also the user U1 has granted full permission to the user U2.

2)vise versa of the above, User U2 (has all permission for the table t1 belongs to user U1) has created trigger T2. 4/ When you reimport the previous, what happens to your application logic?

eg:- I am trying to insert a varchar value into a deptno [number], just to see if trigger fires , and it does, even after going to when others section in exception Why is that so and can I force trigger to fire only on success?

CREATE TABLE DEPT ( DEPTNO NUMBER(5), DNAME VARCHAR2(20 BYTE), LOC VARCHAR2(20 BYTE) ) CREATE TABLE LOG_TABLE ( MESSAGE VARCHAR2(2000 BYTE), TIME_STMP DATE DEFAULT sysdate ) --Trigger on dept table: CREATE OR REPLACE TRIGGER DEPT_TRG BEFORE DELETE OR INSERT OR UPDATE ON DEPT FOR EACH ROW begin insert into log_table(message) values('DML on DEPT Table '); end; / --function for DML on dept create or replace function dml_dept return integer is begin insert into dept(deptno) values('testing trigger behaviour'); exception when others then return -1; end; December 14, 2005 - pm UTC the "exception" is not happening until it happens - the BEFORE trigger you have fires well before the first byte of data is touched.

) help you program TRIGGERS (for it is, well, a chapter on programing triggers) you do not want a table trigger, you want a row trigger so you can write to the : NEW record.

create or replace trigger trg before insert or update on t for each row 2 begin 3 select cast(s.nextval as varchar2(10)) into :new.i from dual; 4 end; 5 / Warning: Trigger created with compilation errors.

As per this note: A trigger can be fired more than once for the same row update from one sql statement. you can have many before triggers -- each modifying the :new values.

How can we make sure that it is fired only once for each row in an update statement other than using "After trigger for statement"? ONLY the after for each row can look at a "stable" value in the :new record.

These 'T4' & 'T5' tables are in database 'B' therefore a db_link is used in for inserting the data in T4 & T5 tables. ( Even I used AUTONOMOUS TRANSAXTION in this trigger but performance has not improoved as desired) March 30, 2007 - pm UTC I can improve this process.

Tags: , ,