I want to do something like this
create type Item as object (
id number,
subitems table of ref Item
)
but oracle throws an exception when I try to do it. Is this possible, and if yes then how?
Oracle will not compile your definition because the type Item
hasn't been compiled yet. Why dont you give this a try:
Compile this:
CREATE OR REPLACE TYPE Item;
CREATE OR REPLACE TYPE items_table IS TABLE OF REF item;
and then try:
CREATE OR REPLACE TYPE item AS OBJECT (
id number,
subitems items_table
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With