20:46:31 SQL> DROP TABLE sophomores CASCADE CONSTRAINTS PURGE
20:46:32 2 /
DROP TABLE sophomores CASCADE CONSTRAINTS PURGE
*
ERROR at line 1:
ORA-00942: table or view does not exist
Elapsed: 00:00:00.01
20:46:32 SQL> DROP TYPE student
20:46:32 2 /
DROP TYPE student
*
ERROR at line 1:
ORA-04043: object STUDENT does not exist
Elapsed: 00:00:00.00
20:46:32 SQL> DROP TYPE CourseList
20:46:32 2 /
DROP TYPE CourseList
*
ERROR at line 1:
ORA-04043: object COURSELIST does not exist
Elapsed: 00:00:00.00
20:46:32 SQL> CREATE TYPE CourseList AS TABLE OF VARCHAR2(10)
20:46:32 2 /
Type created.
Elapsed: 00:00:00.03
20:46:32 SQL> CREATE TYPE student AS OBJECT (
20:46:32 2 id_num INTEGER(4),
20:46:32 3 name VARCHAR2(25),
20:46:32 4 address VARCHAR2(35),
20:46:32 5 status CHAR(2),
20:46:32 6 courses CourseList)
20:46:32 7 /
Type created.
Elapsed: 00:00:00.06
20:46:32 SQL> CREATE TABLE sophomores of student NESTED TABLE courses STORE AS courses_nt
20:46:32 2 /
Table created.
Elapsed: 00:00:00.04
20:46:32 SQL> BEGIN
20:46:32 2 INSERT INTO sophomores
20:46:32 3 VALUES (5035, 'Janet Alvarez', '122 Broad St', 'FT',
20:46:32 4 CourseList('Econ 2010', 'Acct 3401', 'Mgmt 3100'));
20:46:32 5 END;
20:46:32 6 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
20:46:33 SQL> SPOOL OFF
Nested Table Constructor Within a SQL Statement
uh... really like this post.