Partitioning Existing table
Hello,
I would like to partition an existing table. How can i achive this?
This is what i am trying to do:
1) rename existing table
2) import the new table
3) drop the renamed table
But i have foreign key constraints, it is not allowing me to drop it. I dont want to drop all FOREIGN Key constratins.
create table emp_master (no number);
alter table emp_master add constraint pk_emp_master primary key (no);
create table emp_child (no number);
alter table emp_child add ( constraint fk_emp_chilk foreign key (no)
references emp_master(no));
insert into emp_master values (10);
insert into emp_child values (10);
rename emp_master to emp;
Import the table emp_master -- recreating table
drop table emp -- ERROR i am getting.
I also want to point all the foreign key constraints to emp_master table. But the emp table already has that constraint name so i am no longer able to create the same FK name. Well, i will not be able to drop emp table also here in order to create the same PK on emp_master.....