Oracle mobile table, oracle mobile
Oracle mobile table
When creating a table, you can specify a storage space for the table. If not specified, oracle will store the table to the default tablespace. You can move a table from one tablespace to another as needed. Syntax:
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
As shown above, there are three tables in the user's tablespace, all of which are in the users tablespace,
Use this statement to move the student table:
SQL> alter table student move tablespace testspace;
The table has been changed. Query again
SQL> select table_name, tablespace_name from user_tables;
TABLE_NAME
----------------------------------------
TABLESPACE_NAME
------------------------------
USERS
USERS
MESSAGE
USERS
STUDENT
TESTSPACE