Solved

Nested Table in Oracle 817

Posted on 2004-08-01
6
365 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
ID: 11688529
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
ID: 11689150
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
ID: 11689162
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

864 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

21 Experts available now in Live!

Get 1:1 Help Now