oracle创建表空间cmd,oracle 10g 表和表空间创建(在CMD下)

在CMD下进入sqlplus,使用中的简单样例。

eg001

CREATE TABLE "SYSTEM"."XS4"

( "A" CHAR(8),

"B" NUMBER(2),

"C" DATE,

"D" CHAR(8),

"E" CHAR(8),

CONSTRAINT "PK_A" PRIMARY KEY ("A") VALIDATE ,

CONSTRAINT "CH_B" CHECK (b between 1 and 8) VALIDATE )

TABLESPACE "TEST01"

eg002

create table xs5

( xh char(6) not null,

kch char(6) not null,

cj number(2) null,

xf number(2) null,

constraint "pk_xs5" primary key (xh,kch) validate )

tablespace test01

eg003

create table system.xs4

( kch char(8) not null,

kcm char(8) not null,

kkxq number(1) not null,

d char(8) not null,

e char(8) not null,

constraint ch_kkxq check(kkxq between 1 and 8),

constraint "pk_kch" primary key(kch))

pctfree 10 pctused 40 initrans 1 maxtrans 255

tablespace test01

storage(initial 64k minextents 1 pctincrease 40

freelists 1 freelist groups 1 )

eg004

CREATE SMALLFILE TABLESPACE "INDX"

DATAFILE 'D:/ORACLE/PRODUCT/10.2.0/ORADATA/TEST/sjwj_indx'

SIZE 50M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO /*创建表空间INDX */

eg005

insert into system.xs3(a,b,c) values('11111','22222','4444444') /*向表中插入数据*/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值