在一个数据库中有两个表空间A和B,A中有表table1,我现在想把table1移动到表空间B中,请问该怎么办?谢谢

解决方案 »

  1.   

    alter table <tab_name> move tablespace <tbs_name>
      

  2.   

    用alter table<table_name> move tablespace <tbs_name> 只能把以后的数据放入B,而原有的还在A。
      

  3.   

    那oracle有什么办法可以一步到位呢?让以后和将来的数据都放入B中
      

  4.   

    不同用户下的话可以执行
    create table table1 as select * from schema.table1 tablespace b;
    drop table schema.table1;
    同一用户下的话执行
    rename schema.table1 to table2;
    create table table1 as select * from table2 tablespace b;
    drop table table2;