加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
goodsTest.sql 5.20 KB
一键复制 编辑 原始数据 按行查看 历史
--------------------------------------------------------
-- 文件已创建 - 星期二-五月-24-2016
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table GOODS
--------------------------------------------------------
CREATE SEQUENCE "SYSTEM"."SEQ_GOODS" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10 CACHE 20 NOORDER NOCYCLE ;
--------------------------------------------------------
-- DDL for Sequence SEQ_GOODSTYPE
--------------------------------------------------------
CREATE SEQUENCE "SYSTEM"."SEQ_GOODSTYPE" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 4 CACHE 20 NOORDER NOCYCLE ;
CREATE TABLE "SYSTEM"."GOODS"
( "PROID" NUMBER(7,0),
"PRONAME" VARCHAR2(20 BYTE),
"PROPRICE" NUMBER(7,2),
"PROCREATEDATE" DATE,
"PROADDRESS" VARCHAR2(20 BYTE),
"TYPE_ID" NUMBER(7,0)
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SYSTEM" ;
--------------------------------------------------------
-- DDL for Table GOODSTYPE
--------------------------------------------------------
CREATE TABLE "SYSTEM"."GOODSTYPE"
( "TYPEID" NUMBER(7,0),
"TYPENAME" VARCHAR2(20 BYTE)
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SYSTEM" ;
REM INSERTING into SYSTEM.GOODS
SET DEFINE OFF;
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (2,'苹果',20,to_date('24-5月 -16','DD-MON-RR'),'徐州',1);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (1,'石榴',18,to_date('24-5月 -16','DD-MON-RR'),'徐州',1);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (3,'香蕉',20,to_date('24-5月 -16','DD-MON-RR'),'南海',1);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (4,'西瓜',24,to_date('24-5月 -16','DD-MON-RR'),'青岛',1);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (5,'T恤',100,to_date('24-5月 -16','DD-MON-RR'),'义务',3);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (6,'短裤',200,to_date('24-5月 -16','DD-MON-RR'),'义务',3);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (7,'电视',200,to_date('24-5月 -16','DD-MON-RR'),'山东',2);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (8,'空调',300,to_date('24-5月 -16','DD-MON-RR'),'山东',2);
Insert into SYSTEM.GOODS (PROID,PRONAME,PROPRICE,PROCREATEDATE,PROADDRESS,TYPE_ID) values (9,'热水器',400,to_date('24-5月 -16','DD-MON-RR'),'淮海',2);
REM INSERTING into SYSTEM.GOODSTYPE
SET DEFINE OFF;
Insert into SYSTEM.GOODSTYPE (TYPEID,TYPENAME) values (1,'水果');
Insert into SYSTEM.GOODSTYPE (TYPEID,TYPENAME) values (2,'电器');
Insert into SYSTEM.GOODSTYPE (TYPEID,TYPENAME) values (3,'服装');
--------------------------------------------------------
-- DDL for Index SYS_C0011222
--------------------------------------------------------
CREATE UNIQUE INDEX "SYSTEM"."SYS_C0011222" ON "SYSTEM"."GOODS" ("PROID")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SYSTEM" ;
--------------------------------------------------------
-- DDL for Index SYS_C0011221
--------------------------------------------------------
CREATE UNIQUE INDEX "SYSTEM"."SYS_C0011221" ON "SYSTEM"."GOODSTYPE" ("TYPEID")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SYSTEM" ;
--------------------------------------------------------
-- Constraints for Table GOODS
--------------------------------------------------------
ALTER TABLE "SYSTEM"."GOODS" ADD PRIMARY KEY ("PROID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SYSTEM" ENABLE;
--------------------------------------------------------
-- Constraints for Table GOODSTYPE
--------------------------------------------------------
ALTER TABLE "SYSTEM"."GOODSTYPE" ADD PRIMARY KEY ("TYPEID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SYSTEM" ENABLE;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化