Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Oracle PL/SQL Compiler warning PLSQL_WARNINGS

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Xiaobian to share with you Oracle PL/SQL compilation warning PLSQL_WARNINGS example analysis, I hope you have something to gain after reading this article, let's discuss it together!

Three warning categories

1. SEVERE: Check for unexpected results, e.g. alias problems with parameters

2. PERFORMANCE: Performance issues, e.g. VARCHAR2 type provided for column NUMBER in insert

3. INFORMATINAL: Dead Code

Control warning messages (PLSQL_WARNINGS)

The default parameter is PLSQL_WARNINGS='DISABLE:ALL'

Example:

alter session set PLSQL_WARNINGS='ENABLE:INFORMATIONAL';

CREATE OR REPLACE PROCEDURE DEAD_CODE IS

DD VARCHAR2(22);

BEGIN

IF 2>1 THEN

DD:='1';

ELSE --Dead Code

DD:='2';

END IF;

END;

There will be warnings when compiling:

[Warning] PLW-06002 (7: 9): PLW-06002: Unable to execute code

After reading this article, I believe you have a certain understanding of "Oracle PL/SQL Compilation Warning PLSQL_WARNINGS Sample Analysis". If you want to know more about this knowledge, please pay attention to the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report