DBMS_REDEFINITION.START_REDEF_TABLE and execute DBMS_REDEFINITION.FINISH_REDEF_TABLE : DBMS_REDEFINITION « System Packages « Oracle PL / SQL






DBMS_REDEFINITION.START_REDEF_TABLE and execute DBMS_REDEFINITION.FINISH_REDEF_TABLE

 

SQL> create table emp
  2  (Name        VARCHAR2(25) primary key,
  3   Street      VARCHAR2(50),
  4   City        VARCHAR2(25),
  5   State       CHAR(2),
  6   Zip         NUMBER);
SQL>
SQL>
SQL> create table emp_INTERIM
  2  (Name        VARCHAR2(25) primary key,
  3   Street      VARCHAR2(50),
  4   City        VARCHAR2(25),
  5   State       CHAR(2),
  6   Zip         NUMBER)
  7  partition by range (Name)
  8   (partition PART1   values less than ('L'),
  9    partition PART2   values less than (MAXVALUE))
 10  ;

SQL>
SQL>
SQL> execute DBMS_REDEFINITION.START_REDEF_TABLE ('SCOTT','emp','emp_INTERIM');
SQL>
SQL>
SQL> execute DBMS_REDEFINITION.FINISH_REDEF_TABLE('SCOTT','emp','emp_INTERIM');
SQL>
SQL>
SQL> drop table emp_INTERIM;
SQL> drop table emp;

   
  








Related examples in the same category