orcale查询造成锁表的语句
select sql_text from v$sql where hash_value in (
select sql_hash_value from v$session where sid in (select session_id from v$locked_object)
)
select sql_hash_value from v$session where sid in (select session_id from v$locked_object)
)
用这个语句可以查询造成死锁的sql语句