You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
3.5 KiB
67 lines
3.5 KiB
--------------------------------------------------------
|
|
-- DDL for Table HIS_MATERIAL_DATA
|
|
--------------------------------------------------------
|
|
|
|
CREATE TABLE "MIRLE"."HIS_MATERIAL_DATA"
|
|
(
|
|
"STORAGE_ID" VARCHAR2(6 CHAR),
|
|
"LOC_ID" VARCHAR2(9 CHAR),
|
|
"CMD_SNO" VARCHAR2(16 CHAR),
|
|
"CARRIER_ID" VARCHAR2(64 CHAR),
|
|
"MATERIAL_ID" VARCHAR2(30 CHAR),
|
|
"MATERAIL_BATCH" NUMBER(5,0),
|
|
"MATERIAL_QUANTITY" NUMBER(5,0) DEFAULT 1,
|
|
"MATERIAL_WEIGHT" NUMBER(15,3),
|
|
"PROGRAM_NAME" VARCHAR2(30 CHAR),
|
|
"UPDATE_TIME" TIMESTAMP (6),
|
|
"HISTORY_TIME" TIMESTAMP (6) DEFAULT systimestamp,
|
|
)
|
|
SEGMENT CREATION IMMEDIATE
|
|
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" ;
|
|
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."STORAGE_ID" IS '儲存區編號';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."LOC_ID" IS '儲位編號';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."CMD_SNO" IS '命令序號';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."CARRIER_ID" IS '載具邊號';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."MATERIAL_ID" IS '物料編號';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."MATERAIL_BATCH" IS '物料批號';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."MATERIAL_QUANTITY" IS '物料數量';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."MATERIAL_WEIGHT" IS '物料重量';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."PROGRAM_NAME" IS '程式名稱';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."UPDATE_TIME" IS '更新時間';
|
|
COMMENT ON COLUMN "MIRLE"."HIS_MATERIAL_DATA"."HISTORY_TIME" IS '寫入時間';
|
|
|
|
--------------------------------------------------------
|
|
-- DDL for Index HIS_MATERIAL_DATA_PK
|
|
--------------------------------------------------------
|
|
|
|
CREATE UNIQUE INDEX "MIRLE"."HIS_MATERIAL_DATA_PK" ON "MIRLE"."HIS_MATERIAL_DATA" ("CMD_SNO", "MATERIAL_ID")
|
|
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
|
|
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 HIS_MATERIAL_DATA
|
|
--------------------------------------------------------
|
|
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("HISTORY_TIME" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("STORAGE_ID" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("LOC_ID" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("CMD_SNO" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("CARRIER_ID" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("MATERIAL_ID" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("PROGRAM_NAME" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" MODIFY ("UPDATE_TIME" NOT NULL ENABLE);
|
|
ALTER TABLE "MIRLE"."HIS_MATERIAL_DATA" ADD CONSTRAINT "HIS_MATERIAL_DATA_PK" PRIMARY KEY ("CMD_SNO", "MATERIAL_ID")
|
|
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
|
|
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;
|