SQL> CREATE TYPE SKILL_TYPE AS OBJECT (
2 SKILL_ID NUMBER(7,0),
3 SKILL_NAME VARCHAR2(20),
4 SKILL_DESC VARCHAR2(100)
5 );
6 /
Type created.
SQL>
SQL> CREATE TYPE SKILL_TABLE_TYPE AS TABLE OF SKILL_TYPE;
2 /
Type created.
SQL>
SQL> DECLARE
2 SKILL_TABLE SKILL_TABLE_TYPE;
3 BEGIN
4 SKILL_TABLE := SKILL_TABLE_TYPE();
5 SKILL_TABLE.EXTEND(5);
6 SKILL_TABLE(1) := SKILL_TYPE(100,'ROLLERBLADING','REQUIRED FOR TAPE MOUNTING') ;
7 SKILL_TABLE(2) := SKILL_TYPE(101,'NINTENDO','USAF - CLASSIFIED') ;
8 SKILL_TABLE(3) := SKILL_TYPE(102,'KARATE','MANAGEMENT TRAINING') ;
9 END;
10 /
PL/SQL procedure successfully completed.
SQL>
SQL> DROP TYPE SKILL_TYPE FORCE;
Type dropped.
SQL> DROP TYPE SKILL_TABLE_TYPE;
Type dropped.
|