Dear all, Can any one please help me why deadlock is happening here.


SQL> create table gtt ( x int primary key )
2 ;

Table created.

SQL> insert into gtt values ( 1 );

1 row created.

SQL> commit;

Commit complete.

SQL> update gtt set x = 1;

1 row updated.

SQL> declare
2 pragma autonomous_transaction;
3 begin
4 delete from gtt where x = 1;
5 end;
6 /
declare
*
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource
ORA-06512: at line 4


SQL>