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.

61 lines
3.1 KiB

8 months ago
  1. --------------------------------------------------------
  2. -- DDL for Table CUR_MATERIAL_DATA
  3. --------------------------------------------------------
  4. CREATE TABLE "MIRLE"."CUR_MATERIAL_DATA"
  5. (
  6. "STORAGE_ID" VARCHAR2(6 CHAR),
  7. "LOC_ID" VARCHAR2(9 CHAR),
  8. "CMD_SNO" VARCHAR2(16 CHAR),
  9. "CARRIER_ID" VARCHAR2(64 CHAR),
  10. "MATERIAL_ID" VARCHAR2(30 CHAR),
  11. "MATERIAL_BATCH" NUMBER(5,0),
  12. "MATERIAL_QUANTITY" NUMBER(5,0) DEFAULT 1,
  13. "MATERIAL_WEIGHT" NUMBER(15,3),
  14. "PROGRAM_NAME" VARCHAR2(30 CHAR),
  15. "UPDATE_TIME" TIMESTAMP (6)
  16. )
  17. SEGMENT CREATION IMMEDIATE
  18. PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  19. NOCOMPRESS LOGGING
  20. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  21. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  22. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  23. TABLESPACE "SYSTEM" ;
  24. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."STORAGE_ID" IS '儲存區編號';
  25. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."LOC_ID" IS '儲位編號';
  26. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."CMD_SNO" IS '命令序號';
  27. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."CARRIER_ID" IS '載具編號';
  28. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."MATERIAL_ID" IS '物料編號';
  29. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."MATERIAL_BATCH" IS '物料批號';
  30. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."MATERIAL_QUANTITY" IS '物料數量';
  31. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."MATERIAL_WEIGHT" IS '物料重量(kg)';
  32. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."PROGRAM_NAME" IS '程式名稱';
  33. COMMENT ON COLUMN "MIRLE"."CUR_MATERIAL_DATA"."UPDATE_TIME" IS '更新時間';
  34. --------------------------------------------------------
  35. -- DDL for Index CUR_MATERIAL_DATA_PK
  36. --------------------------------------------------------
  37. CREATE UNIQUE INDEX "MIRLE"."CUR_MATERIAL_DATA_PK" ON "MIRLE"."CUR_MATERIAL_DATA" ("STORAGE_ID", "LOC_ID")
  38. PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  39. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  40. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  41. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  42. TABLESPACE "SYSTEM" ;
  43. --------------------------------------------------------
  44. -- Constraints for Table CUR_MATERIAL_DATA
  45. --------------------------------------------------------
  46. ALTER TABLE "MIRLE"."CUR_MATERIAL_DATA" MODIFY ("STORAGE_ID" NOT NULL ENABLE);
  47. ALTER TABLE "MIRLE"."CUR_MATERIAL_DATA" MODIFY ("LOC_ID" NOT NULL ENABLE);
  48. ALTER TABLE "MIRLE"."CUR_MATERIAL_DATA" MODIFY ("CMD_SNO" NOT NULL ENABLE);
  49. ALTER TABLE "MIRLE"."CUR_MATERIAL_DATA" MODIFY ("CARRIER_ID" NOT NULL ENABLE);
  50. ALTER TABLE "MIRLE"."CUR_MATERIAL_DATA" MODIFY ("MATERIAL_ID" NOT NULL ENABLE);
  51. ALTER TABLE "MIRLE"."CUR_MATERIAL_DATA" ADD CONSTRAINT "CUR_MATERIAL_DATA_PK" PRIMARY KEY ("STORAGE_ID", "LOC_ID")
  52. USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  53. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  54. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  55. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  56. TABLESPACE "SYSTEM" ENABLE;