Home > Database > Mysql Tutorial > Oracle移动表

Oracle移动表

WBOY
Release: 2016-06-07 16:08:44
Original
997 people have browsed it

在创建表时可以为表指定存储空间,如果不指定,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

本文永久更新链接地址

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template