【Oracle】迁移表到其他的表空间

有些时候需要将表迁移到其他的表空间,在将表空间做相关的操作

下面是命令如何迁移表空间

SQL> alter table 表名 move tablespace 表空间名;

如果有很多的表想要迁移的话,可以这样操作:

SQL> select 'alter table ' ||table_name || ' move tablespace 目标表空间名称;' from user_all_tables where tablespace_name='源表空间名称'

这样就迁移成功了




posted @ 2017-11-06 16:29  zclinux  阅读(567)  评论(0)    收藏  举报