SQL_ID

(5.6)
ない模様

 

(12cR1)

select /* TEST */ * from tab1;


select sql_id,sql_text,child_number
from v$sql
where sql_text like '%TEST%'
;

 

 

(9.4)
select /* TEST */ * from tab1;
select userid,dbid,queryid,query from pg_stat_statements;

 

(2014)

select /* TEST */ * from tab1;

select t1.sql_handle,t2.text
from sys.dm_exec_query_stats t1
cross apply sys.dm_exec_sql_text(t1.sql_handle) t2
where t2.text like '%TEST%'
;