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.

66 lines
3.5 KiB

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