SQL> -- INSERT
SQL>
SQL> CREATE OR REPLACE TYPE numberVarryType AS VARRAY(10)OF NUMBER(10);
2 /
Type created.
SQL>
SQL> CREATE TABLE address_list (
2 list_id VARCHAR2(6)PRIMARY KEY,
3 direct_addresses numberVarryType
4 );
Table created.
SQL>
SQL>
SQL> INSERT INTO address_list VALUES('O1',numberVarryType(1001,1002,1003,1004));
1 row created.
SQL>
SQL> DECLARE
2 v_add_varray numberVarryType :=numberVarryType(2001,2002);
3 BEGIN
4 INSERT INTO address_list VALUES ('OFF102',v_add_varray);
5 END;
6 /
PL/SQL procedure successfully completed.
SQL>
SQL> drop table address_list;
Table dropped.
SQL>
|