Create table based on single data type : Object Table « Object Oriented Database « Oracle PL / SQL






Create table based on single data type

   

SQL> create table myTable of xmltype;

Table created.

SQL>
SQL> insert into myTable values(XMLTYPE('
  2    <customer>
  3     <name>name value</name>
  4     <telephone>123 555-1234</telephone>
  5    </customer>'))
  6  /

1 row created.

SQL>
SQL> select * from myTable;



SYS_NC_ROWINFO$
------------------------------------------------------

  <customer>
   <name>name value</name>
   <telephone>123 555-1234</telephone>

1 row selected.

SQL>
SQL>
SQL> drop table myTable;

Table dropped.

   
    
    
  








Related examples in the same category

1.Crate table with object column
2.Use a table alias and the name of the object
3.Create table with user defined type as column
4.Create a table with user define varray as column type
5.Create a table with nested user defined type as column
6.Object table: a table of type
7.Use user-defined varray type as column type
8.Nested table
9.Create a table based on user-defined object only
10.Implementation of many to many using object references
11.Implementation of multiple inheritance relationship
12.Implementation of one to many using object references
13.Create table with nested types
14.Create type and use it as table column
15.One to one using object references
16.Use user-defined type to combine query logic
17.Create a new type and add it to a table
18.Multilevel aggregation relationships using nested tables