Reference type column : Object Column « Object Oriented Database « Oracle PL / SQL






Reference type column

    

SQL> CREATE or replace TYPE BookType;
  2  /

Type created.

SQL> PROMPT Now we can create ProductType successfully
Now we can create ProductType successfully
SQL>
SQL> CREATE OR REPLACE TYPE ProductType AS OBJECT (
  2     item_id        NUMBER(10),
  3     num_in_stock   NUMBER(10),
  4     reorder_status VARCHAR2(20),
  5     price       REF   BookType);
  6  /

Type created.

   
    
    
    
  








Related examples in the same category

1.The Object Type Column Objects
2.Format column in the object
3.Alter a table with user-defined object to upgrade including data
4.use user-defined type as the column type
5.Query column with user-defined type
6.Check object table column type
7.Use varray in a table
8.Nested type Column
9.This script demonstrates column objects.
10.Reference nested data type in select statement