I have a trigger insert/update trigger_A on table A which updates the anathor table B.
I have created one more insert trigger_B on table B which updates a row in table A.
I tried to fixed it by using pragma autonomous_transaction but it is giving me deadlock error. Please help.
What, exactly, are you trying to accomplish?
If this setup were to work, what would stop the infinite loop of triggers (an insert into A fires trigger_A which inserts into B which fires trigger_B which inserts into A which fires trigger_A...)?
Are you storing the same data in two different tables? If so, why? That violates basic normalization. Why didn't you choose a properly normalized design?
Welcome to the forum.
Triggers+autonomous transactions = recipe for disaster and the wrong way to go.
You should rethink what it is you're trying to accomplish.
Probably a COMMIT would get you past the deadlock error (if I recall correctly), but then your data can get corrupted, as you are messing with transactions.
Probably a procedural approach would be best.
Triggers have several disadvantages (slow-by-slow processing, performance, 'automagical' stuff happening), as you now are discovering.
Consult the Online Oracle Documentation regarding autonomous transactions and the deadlock error @
And for some more background: