Home > database >  Want to create a nested table, but the operation error, (Err) ORA - 24344: success with compilation
Want to create a nested table, but the operation error, (Err) ORA - 24344: success with compilation

Time:09-16

[SQL] the CREATE TYPE animal_ty AS OBJECT (
Breed VARCHAR2 (25),
NAME VARCHAR2 (25),
The birthdate DATE
);


The CREATE TYPE animals_nt AS TABLE OF animal_ty;


The CREATE TABLE breeder (
Breedername VARCHAR2 (25),
Animals animal_nt
) NESTED TABLE animals STORE AS animals_nt_tab;
(Err) ORA - 24344: success with compilation error

CodePudding user response:

You defined above is animal s _nt, reference is animal_nt below

CodePudding user response:

Thanks to the second floor to help me find low-level mistakes, modified, is still an error. Please help me to look at the trouble
[SQL] the CREATE TYPE animal_ty AS OBJECT (
Breed VARCHAR2 (25),
NAME VARCHAR2 (25),
The birthdate DATE
);


The CREATE TYPE animal_nt AS TABLE OF animal_ty;


The CREATE TABLE breeder (
Breedername VARCHAR2 (25),
Animals animal_nt
) NESTED TABLE animals STORE AS animals_nt_tab;
(Err) ORA - 24344: success with compilation error


CodePudding user response:

The
reference
SQL> The CREATE TYPE animal_ty AS OBJECT (
2 breed VARCHAR2 (25),
3 the NAME VARCHAR2 (25),
4 the birthdate DATE
5);
6/

Type created.

SQL> The CREATE TYPE animal_nt AS TABLE OF animal_ty;
2/

Type created.

SQL> The CREATE TABLE breeder (
2 breedername VARCHAR2 (25),
3 animals animal_nt
4) NESTED TABLE animals STORE AS animals_nt_tab;

The Table created.

SQL>

I built this again, no problem ~

CodePudding user response:

Thank you for your help issue has been resolved

The CREATE TYPE animal_ty AS OBJECT (
Breed VARCHAR2 (25),
NAME VARCHAR2 (25),
The birthdate DATE
);


The CREATE TYPE animal_nt AS TABLE OF animal_ty;


The CREATE TABLE breeder (
Breedername VARCHAR2 (25),
Animals animal_nt
) NESTED TABLE animals STORE AS animal_nt_tab;

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- Records of breeder
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Insert into breeder values (' Mary 'animal_nt (animal_ty (' dog', 'butch' and '31 MAR - 97'), animal_ty (' dog ', 'rover', '31 MAR - 97'), animal_ty (' dog ', 'Julio', '31 MAR - 97')));
Insert into breeder values (' Jane 'animal_nt (animal_ty (' cat', 'an', '31 MAR - 97'), animal_ty (' cat ', 'James',' 31 MAR - 97 '), animal_ty (' cat 'and' killer ', '31 MAR - 97')));
  • Related