设为首页 加入收藏

TOP

Oracle表空间管理(二)
2014-11-24 02:35:41 来源: 作者: 【 】 浏览:4
Tags:Oracle 空间 管理
examp01和examp02的数据文件中。

drop tablespaceexampletb including contents;

创建表空间,然后删除该表空间及数据文件。

Create tablespaceexampletb

Datafile 'E:\ examp01.dbf' size 5M autoextend on next 128k maxsize 1000mreuse,

'E:\examp02.dbf' size 5Mautoextend on next 128k maxsize 1000m reuse;

drop tablespaceexampletb including datafiles;

创建表空间和表,然后删除该表空间及数据文件。

Createtablespace exampletb

Datafile 'E:\ examp01.dbf' size 5M autoextend on next 128k maxsize 1000m,

'E:\examp02.dbf' size 5Mautoextend on next 128k maxsize 1000m;

create tablescott.student

(

id number,

name VARCHAR2(10)

)tablespaceexampletb;

drop tablespaceexampletb including contents and datafiles;

说明:如果drop tablespace语句中含有datafiles,那datafiles之前必须有contents关键字,不然会提示错误。

创建两个表空间,分别在其中创建主码表和外码表,然后删除包含主码表的表空间及数据文件。

Createtablespace exampletb1

Datafile 'E:\ examp03.dbf' size 5M autoextend on next 128k maxsize 1000m;

Createtablespace exampletb2

Datafile 'E:\ examp02.dbf' size 5M autoextend on next 128k maxsize 1000m;

create tabletest1(mobile number(13) primary key)tablespace exampletb1;

create table test2(mobile number(13) references test1(mobile)) tablespace exampletb2;

drop tablespace exampletb1 including contents and datafiles cascade constraints;

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle数据库如何搜集指定SQL的执.. 下一篇oracle10gRAC[恢复OCR]

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: