PLSQL中 INDEX BY TABLE 的小例子
开始
--INDEX BY Table SET SERVEROUTPUT ON; DECLARE TYPE enm_tab_type IS TABLE OF emp.ename%TYPE INDEX BY BINARY_INTEGER; enm_table enm_tab_type; BEGIN enm_table(1):='ABCD'; IF enm_table.EXISTS(1) THEN dbms_output.put_line( enm_table(1)); ELSE dbms_output.put_line( 'not exists(1)'); END IF; END; /
结束