You can use an object type to define an entire table, and the table is known as an object table. : Object Column « Object Oriented « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE or replace TYPE EmployeeType AS OBJECT (
  2    id          NUMBER,
  3    name        VARCHAR2(15),
  4    description VARCHAR2(22),
  5    salary       NUMBER(5, 2)
  6  );
  7  /

Type created.

SQL> CREATE TABLE object_employee OF EmployeeType;

Table created.

SQL>
SQL> desc object_employee;
 Name                Null?    Type
 ID                           NUMBER
 NAME                         VARCHAR2(15)
 DESCRIPTION                  VARCHAR2(22)
 SALARY                       NUMBER(5,2)

SQL>
SQL> drop table object_employee;

Table dropped.

SQL>
SQL>
SQL>








32.7.Object Column
32.7.1.Using Object Types to Define Column Objects and Object Tables
32.7.2.You can use an object type to define an entire table, and the table is known as an object table.
32.7.3.The Object Type Column Objects
32.7.4.Loading the 'row object' Table
32.7.5.SELECT with a WHERE Clause
32.7.6.UPDATE Data in a Table of Row Objects
32.7.7.Using UPDATE with TYPEed Columns
32.7.8.Query a table with user-defined column type
32.7.9.Use * to reference all columns from a table
32.7.10.Use 'table of custom type' as table column type
32.7.11.Nested varray and table collection column
32.7.12.Create type and use it as table column
32.7.13.Nested type Column
32.7.14.Create a new type and add it to a table