其实只是一条语句,步步递进
Select addr from v$process c where c.spid='30154';
Select decode(sql_hash_value, 0, prev_hash_value, sql_hash_value),
Decode(sql_hash_value, 0, prev_sql_addr, sql_address)
From v$session b
where (b.paddr = (Select addr from v$process c where c.spid = '30154'));
select sql_text from v$sqltext a where (a.hash_value,a.address) IN
(Select decode(sql_hash_value,0,prev_hash_value,sql_hash_value),
Decode(sql_hash_value,0,prev_sql_addr,sql_address)
From v$session b where (b.paddr = (Select addr from v$process c where c.spid='30154')));