17,377
社区成员
发帖
与我相关
我的任务
分享
create table sanny_goods(
code varchar2(100) constraint NN_sannygoods_code not null,
name varchar2(100),
price binary_double,
total number,
constraint PK_SANNYGOODS_CODE primary key(code) using index tablespace sanny_index
);
comment on table sanny_goods is '商品表';
comment on column sanny_goods.code is '商品编码';
comment on column sanny_goods.name is '商品名称';
comment on column sanny_goods.price is '商品价格';
comment on column sanny_goods.total is '商品库存';
create table SANNY_GOODS
(
CODE VARCHAR2(100),
NAME VARCHAR2(100),
PRICE BINARY_DOUBLE,
TOTAL NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
comment on table SANNY_GOODS
is '商品表';
comment on column SANNY_GOODS.CODE
is '商品编码';
comment on column SANNY_GOODS.NAME
is '商品名称';
comment on column SANNY_GOODS.PRICE
is '商品价格';
comment on column SANNY_GOODS.TOTAL
is '商品库存';
alter table SANNY_GOODS
add constraint PK_SANNYGOODS_CODE primary key (CODE)
using index
tablespace SANNY_INDEX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table SANNY_GOODS
add constraint NN_SANNYGOODS_CODE
check ("CODE" IS NOT NULL);