Query SQL table : sql « System Tables Views « Oracle PL / SQL






Query SQL table

 
SQL>
SQL> select * from dual;

D
-
X

SQL> select * from DUAL;

D
-
X

SQL>
SQL> select sql_text, hash_value from v$sql where upper(sql_text) = 'SELECT * FROM DUAL';

SQL_TEXT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HASH_VALUE
----------
select * from DUAL
3649189949

select * from dual
 942515969

SQL_TEXT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HASH_VALUE
----------

select * from dual
 942515969


3 rows selected.

SQL>
SQL> alter session set OPTIMIZER_MODE = first_rows;

Session altered.

SQL>
SQL> select * from dual;

D
-
X

 








Related examples in the same category

1.select sql_text, hash_value, parsing_user_id, optimizer_mode from v$sql