在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') /*向表中插入数据*/