1、表空间批量更改:
1)当前用户全部更改
select 'alter table '||table_name||' move tablespace NEWTABLESPACE;' from user_tables
2)按条件选择更改
select 'alter table '||table_name||' move tablespace NEWTABLESPACE;' from user_tables
where table_name like '%table_name条件%'
2、查询当前用户下的所有索引
select 'alter index '|| index_name ||' rebuild tablespace NEWTABLESPACE;' from user_indexes;
执行生成的结果.
注意:表空间修改后,相应索引(如主键等)也需同时修改。