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?
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?
That would be nice wouldn't it! You could try this:
Which means that subitems is just a list of ids, which would then be used to look up a table indexed by id.
Oracle will not compile your definition because the type
Item
hasn't been compiled yet. Why dont you give this a try:Compile this:
and then try: