📜  oracle运行查询sql代码示例

📅  最后修改于: 2022-03-11 15:04:56.939000             🧑  作者: Mango

代码示例1
SELECT s.SID,
       s.USERNAME,
       sql.OPTIMIZER_MODE,
       sql.CPU_TIME,
       sql.ELAPSED_TIME,
       sql.SQL_TEXT,
       s.SERIAL#
FROM V$SQLAREA sql,
     V$SESSION s
WHERE s.SQL_HASH_VALUE = sql.HASH_VALUE
  AND s.SQL_ADDRESS = sql.ADDRESS
  AND s.USERNAME IS NOT NULL;