Oracle移动表

2015-03-18 22:55:48 · 作者: · 浏览: 43

alter table table_name move tablespace tablespace_name;
SQL> select table_name,tablespace_name from user_tables;


TABLE_NAME
----------------------------------------
TABLESPACE_NAME
------------------------------
USERS
USERS



STUDENT
USERS



MESSAGE
USERS
如上所示,在该用户的tablespace中有三张表,他们都位于users表空间中,
使用该语句移动student表:
SQL> alter table student move tablespace testspace;


表已更改。再次查询


SQL> select table_name,tablespace_name from user_tables;


TABLE_NAME
----------------------------------------
TABLESPACE_NAME
------------------------------
USERS
USERS



MESSAGE
USERS



STUDENT
TESTSPACE