在创建表时可以为表指定存储空间,如果不指定,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
本文永久更新链接地址:
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号