Alter a table with user-defined object to upgrade including data : Object Column « Object Oriented Database « Oracle PL / SQL






Alter a table with user-defined object to upgrade including data

     
SQL>
SQL> create or replace
  2  type person as object(
  3   first_name varchar2(100),
  4   last_name varchar2(100) )
  5  /

Type created.

SQL>
SQL>
SQL> create table person_table(
  2   name person,
  3   age number )
  4  /

Table created.

SQL>
SQL>
SQL>
SQL> alter table person_table upgrade including data;

Table altered.

SQL>
SQL>
SQL> drop table person_table;

Table dropped.

SQL>
SQL>
SQL> drop type person;

Type dropped.

SQL>
SQL>

   
    
    
    
  








Related examples in the same category

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