|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
more than 1 nested table
I am facing a problem with nested tables.I am trying to create a table with two nested tables in it.
Eg. create type book_type as object(bookname varchar2(20), bookid varcar2(20));/ create type book_type_tab as table of book_type;/ create type pen_type as object(pen_name varchar2(22), pen_color varchar2(20));/ create type pen_type_tab as table of pen_type;/ Then i craete a table with these two types as columns. create table college(ssnid number, books book_type_tab, pens pen_type_tab) nested table books store as books_nt, nested table pens store as pens_nt ((primary key(bookid, nested_table_id)); When i do this it gives me a error saying that it is not able to create the storage table for pens. Is it not allowed to use two nested tables in a table.Plaese let me know if there is any problem with my creation of tables. Thanks for any help. Tanuja. |
|
#2
|
|||
|
|||
|
Please look into the underlined portion of your code :
create type book_type as object(bookname varchar2(20), bookid varcar2(20));/ --------------- It shouold be varchar2(20) and not varcar2(20) |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > more than 1 nested table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|