1、查询当前用户下的所有表
select 'alter table '|| table_name ||' move tablespace tablespacename;' from user_all_tables;
2、查询当前用户下的所有索引
select 'alter index '|| index_name ||' rebuild tablespace tablespacename;' from user_indexes;
3、在当前用户下将查询结果批处理执行即可!
select 'alter table '|| table_name ||' move tablespace tablespacename;' from user_all_tables;
2、查询当前用户下的所有索引
select 'alter index '|| index_name ||' rebuild tablespace tablespacename;' from user_indexes;
3、在当前用户下将查询结果批处理执行即可!