SQL> select sql_text,LAST_ACTIVE_TIME from v$sql where sql_text like '%select count(*) from t%';
SQL_TEXT
-------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
LAST_ACTIVE_TI
--------------
select sql_text,LAST_ACTIVE_TIME from v$sql where sql_text like '%select count(*) from t%'
01-9月 -11
select count(*) from t
01-9月 -11
SQL> select sql_text,to_char(LAST_ACTIVE_TIME,'yyyy-mm-dd hh24:mi:ss') from v$sql where sql_text like '%select count(*) from t%';
SQL_TEXT
-------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
TO_CHAR(LAST_ACTIVE
-------------------
select sql_text,LAST_ACTIVE_TIME from v$sql where sql_text like '%select count(*) from t%'
2011-09-01 16:10:46
select count(*) from t
2011-09-01 16:09:58
select sql_text,to_char(LAST_ACTIVE_TIME,'yyyy-mm-dd hh24:mi:ss') from v$sql where sql_text like '%select count(*) from t%'
2011-09-01 16:11:31
SQL> select TIMESTAMP_TO_SCN(to_date('2011-09-01 16:11:31','yyyy-mm-dd hh24:mi:ss')) from dual;