Hoq to DROP and Re Create the parent table P1 which has child tables C1,C2,C3?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shema123
    New Member
    • Nov 2013
    • 1

    Hoq to DROP and Re Create the parent table P1 which has child tables C1,C2,C3?

    Hi Everyone,

    I have a parent table P1(pid,name,ran k) and child tables
    C1(Cid,name,sal ,PID), C2(Cid,name,sal ,PID),
    C3(Cid,name,sal ,PID). P1 and C1,C2,C3 has foreign key relation.

    Now I want to DROP the parent table P1 and Recreate by keeping the data in child tables and also the relation with the newly created table. Can somebody explain how can achieve it?
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    You can
    1) disable foreign keys in C1, C2 and C3, see here http://www.techonthenet.com/oracle/f...ys/disable.php
    2) recreate P1 table
    3) enable C1, C2, and C3 foreign keys

    Comment

    Working...