oracle移动表,oracle移动
oracle移动表在创建表时可以为表指定存储空间,如果不指定,oracle会将该表存储到默认的表空间中。根据需要可以将表从一个表空间移动到另一个表空间中。语法如下:
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
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。