In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Http://www.itpub.net/thread-1499223-17-1.html
167th floor
Which of the following options causes uncaught exceptions after execution:
ORA-06502: PL/SQL: numeric or value error: number precision too large
(A)
DECLARE l_number NUMBER (2): = 100 END; begin DBMS_OUTPUT.put_line (l_number); END;/SQL > DECLARE 2 l_number NUMBER (2): = 100; 3 BEGIN 4 DBMS_OUTPUT.put_line (l_number); 5 END; 6 / DECLARE l_number NUMBER (2): = 100 x begin DBMS_OUTPUT.put_line (l_number); END ORA-06502: PL/SQL: number or value error: numerical accuracy is too high ORA-06512: in line 2SQL >
(B)
DECLARE l_number NUMBER (2): = 100 DBMS_OUTPUT.put_line begin DBMS_OUTPUT.put_line (l_number); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('ERROR'); END;/SQL > DECLARE 2 l_number NUMBER (2): = 100; 3 BEGIN 4 DBMS_OUTPUT.put_line (l_number); 5 EXCEPTION 6 WHEN OTHERS 7 THEN 8 DBMS_OUTPUT.put_line (' ERROR'); 9 END 10 / DECLARE l_number NUMBER (2): = 100 begin DBMS_OUTPUT.put_line (l_number); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('ERROR'); END;ORA-06502: PL/SQL: number or value error: too high numerical accuracy ORA-06512: in line 2SQL >
(C)
CREATE OR REPLACE PACKAGE plch_pkgIS FUNCTION get_number RETURN NUMBER;END;/CREATE OR REPLACE PACKAGE BODY plch_pkgIS g_date DATE; g_number NUMBER (2): = 100; FUNCTION get_number RETURN NUMBER IS BEGIN RETURN gears number; END;BEGIN g_date: = SYSDATE;EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('ERROR'); END;/DECLARE l_number NUMBER (2): = plch_pkg.get_number BEGIN DBMS_OUTPUT.put_line (l_number); END;/SQL > CREATE OR REPLACE PACKAGE plch_pkg 2 IS 3 FUNCTION get_number 4 RETURN NUMBER; 5 END; 6 / Package createdSQL > CREATE OR REPLACE PACKAGE BODY plch_pkg 2 IS 3 g_date DATE; 4 g_number NUMBER (2): = 100; 5 6 FUNCTION get_number 7 RETURN NUMBER 8 IS 9 BEGIN 10 RETURN g numbers; 11 END 12 BEGIN 13 g_date: = SYSDATE; 14 EXCEPTION 15 WHEN OTHERS 16 THEN 17 DBMS_OUTPUT.put_line ('ERROR'); 18 END; 19 / Package body createdSQL > DECLARE 2 l_number NUMBER (2): = plch_pkg.get_number; 3 BEGIN 4 DBMS_OUTPUT.put_line (l_number); 5 END; 6 / DECLARE l_number NUMBER (2): = plch_pkg.get_number BEGIN DBMS_OUTPUT.put_line (l_number); END;ORA-06502: PL/SQL: number or value error: numerical accuracy is too high ORA-06512: in "YOGA.PLCH_PKG", line 4ORA-06512: in line 2SQL >
(D)
CREATE OR REPLACE PACKAGE plch_pkgIS g_number NUMBER (2): = 100 END; EndpostActionDECLARE l_number NUMBER (2): = plch_pkg.g_number;BEGIN DBMS_OUTPUT.put_line (l_number); END;/SQL > CREATE OR REPLACE PACKAGE plch_pkg 2 IS 3 g_number NUMBER (2): = 100; 4 END; 5 / Package createdSQL > DECLARE 2 l_number NUMBER (2): = plch_pkg.g_number 3 BEGIN 4 DBMS_OUTPUT.put_line (l_number); 5 END; 6 / DECLARE l_number NUMBER (2): = plch_pkg.g_number;BEGIN DBMS_OUTPUT.put_line (l_number); END;ORA-06502: PL/SQL: numeric or value error: too high numerical accuracy ORA-06512: in "YOGA.PLCH_PKG", line 3ORA-06512: in line 4SQL >
The answer is on the 172nd floor.
2011-11-21 answer: ABCD
If the exception occurs before the BEGIN, such as the DECLARE part or the variable initialization part of the PACKAGE, the exception will not be caught by the EXCEPTION of the current block, but will continue to propagate outward.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.