如何在oracle中的过程或包中找到未使用的变量?

时间:2014-06-03 09:59:29

标签: oracle-sqldeveloper

如何在oracle包或过程中找到UNUSED变量

 for example:-

 I am declaring 100 variables in procedure, among those i used 70 variables in procedure body. I want the unused variables(100-70)=30.

1 个答案:

答案 0 :(得分:1)

您可以使用PL / Scope和/或编译器警告获取该信息。

ALTER SESSION SET PLSCOPE_SETTINGS='IDENTIFIERS:ALL';

(OR)

ALTER SESSION SET PLSQL_WARNINGS='ENABLE:ALL';

参见此相关帖子

Oracle PL/SQL: How to find unused variables in a long package?

How to find Unused variables in procedure,function or package