http://www.itpub.net/thread-1499223-1-1.html
1 楼
哪一个PLSQL块执行之后会显示下面的三行数字?
0
1
2
A
DECLARE TYPE numbers_t IS TABLE OF NUMBER; l_numbers numbers_t := numbers_t (); BEGIN DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers.EXTEND (); l_numbers (1) := 100; DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers.EXTEND (); DBMS_OUTPUT.put_line (l_numbers.COUNT); END; /
0 1 2
B
DECLARE TYPE numbers_t IS TABLE OF NUMBER; l_numbers numbers_t := numbers_t (); BEGIN DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers.EXTEND (2); l_numbers (1) := 100; DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers (2) := 100; DBMS_OUTPUT.put_line (l_numbers.COUNT); END; /
0 2 2
C
DECLARE TYPE numbers_t IS TABLE OF NUMBER; l_numbers numbers_t := numbers_t (); BEGIN DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers.EXTEND (2); l_numbers (1) := 100; l_numbers.DELETE (1); DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers (2) := 100; DBMS_OUTPUT.put_line (l_numbers.COUNT); END; /
0 1 1
D
DECLARE TYPE numbers_t IS TABLE OF NUMBER; l_numbers numbers_t := numbers_t (); BEGIN DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers.EXTEND (2); l_numbers (1) := 100; l_numbers.DELETE (1); DBMS_OUTPUT.put_line (l_numbers.COUNT); l_numbers (1) := 200; l_numbers (2) := 100; DBMS_OUTPUT.put_line (l_numbers.COUNT); END; /
0 1 2
知识点后补
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。