1.修改 表的空间
alter table TABLE_NAME move tablespace TABLESPACENAME
查询当前用户下的所有表
select 'alter table '|| table_name ||' move tablespace tablespacename;' from user_all_tables;
2.修改 表的索引的空间
alter index INDEX_NAME rebuild tablespace TABLESPACENAME
查询当前用户下的所有索引
select 'alter index '|| index_name ||' rebuild tablespace tablespacename;' from user_indexes;