Solved

Nested Table in Oracle 817

Posted on 2004-08-01
6
363 Views
Last Modified: 2008-01-09
Hi All

 Thanks very much for answering my previous questions.

 If I delete my parent table, will the same command delete all it's nested tables or do I need to handle nested table separately? Please advise.

For e.g

  Create table test (
   id number,
   name varchar2(250),
   address address_tab)
   nested table address store as nested_address;

If I delete test table , will it delete the content for address also?



 
0
Comment
Question by:ssabapathy
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
mmoore earned 250 total points
Comment Utility
The quote below is not a direct answer to your question but the implication is that when you drop the parent table, all nested tables will also be droped. It is hard to imagine how it could work any other way.

"You cannot directly drop the storage table of a nested table.
Instead, you must drop the nested table column using the ALTER
...
ALTER TABLE department
DROP COLUMN courses; " - http://66.102.7.104/search?q=cache:g-gneyO_vfAJ:www.psoug.org/reference/nested_tab.html+oracle+++%22drop+nested+table%22&hl=en

The above statement was for 9.2.
HTH
Mike
0
 
LVL 23

Expert Comment

by:seazodiac
Comment Utility
Yes, want to confirm , dropping the parent table will drop the nested table.
0
 
LVL 23

Assisted Solution

by:seazodiac
seazodiac earned 250 total points
Comment Utility
all in all, nested table behaves exactly as an attribute value of a relation, and follow the same transaction rule as in delete, update, insert.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now