exec dbms_redefinition.abort_redef_table('PUBS','TITLES','TITLES2'); alter table titles add constraint pk_titles PRimary key (title_id); exec dbms_redefinition.can_redef_table('PUBS','TITLES'); create table titles2 as select * from titles; exec dbms_redefinition.start_redef_table('PUBS','TITLES','TITLES2','title_id title_id,title title,type type,pub_id pub_id,price price,advance advance,royalty*1.1 royalty,ytd_sales ytd_sales,notes notes,pubdate pubdate'); exec dbms_redefinition.sync_interim_table('PUBS','TITLES','TITLES2'); exec dbms_redefinition.finish_redef_table('PUBS','TITLES','TITLES2'); drop table titles2; |