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.

72 lines
3.8 KiB

8 months ago
  1. --------------------------------------------------------
  2. -- DDL for Table CFG_MATERIAL
  3. --------------------------------------------------------
  4. CREATE TABLE "MIRLE"."CFG_MATERIAL"
  5. (
  6. "MATERIAL_ID" VARCHAR2(30 CHAR),
  7. "MATERIAL_NAME" VARCHAR2(50 CHAR),
  8. "MATERIAL_UNIT" VARCHAR2(3 CHAR) DEFAULT '',
  9. "MATERIAL_TYPE" NUMBER(1,0),
  10. "MATERIAL_WEIGHT" NUMBER(15,3),
  11. "MATERIAL_SAFE_DAY" NUMBER(3,0),
  12. "PRODUCT_TYPE" VARCHAR2(10 CHAR),
  13. "REMARKS" VARCHAR2(255 CHAR),
  14. "CREATE_USER" VARCHAR2(30 CHAR),
  15. "CREATE_TIME" TIMESTAMP (6) DEFAULT systimestamp,
  16. "UPDATE_USER" VARCHAR2(30 CHAR),
  17. "UPDATE_TIME" TIMESTAMP (6) DEFAULT systimestamp,
  18. "STATUS" NUMBER(1,0) DEFAULT 0
  19. )
  20. SEGMENT CREATION IMMEDIATE
  21. PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  22. NOCOMPRESS LOGGING
  23. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  24. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  25. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  26. TABLESPACE "SYSTEM" ;
  27. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."MATERIAL_ID" IS '物料編號';
  28. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."MATERIAL_NAME" IS '物料名稱';
  29. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."MATERIAL_UNIT" IS '物料單位';
  30. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."MATERIAL_TYPE" IS '物料類別';
  31. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."MATERIAL_WEIGHT" IS '物料重量(kg)';
  32. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."MATERIAL_SAFE_DAY" IS '物料保存天數';
  33. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."PRODUCT_TYPE" IS '產品類別';
  34. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."REMARKS" IS '備註';
  35. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."CREATE_USER" IS '建立人員';
  36. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."CREATE_TIME" IS '建立時間';
  37. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."UPDATE_USER" IS '更新人員';
  38. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."UPDATE_TIME" IS '更新時間';
  39. COMMENT ON COLUMN "MIRLE"."CFG_MATERIAL"."STATUS" IS '資料狀態';
  40. --------------------------------------------------------
  41. -- DDL for Index CFG_MATERIAL_PK
  42. --------------------------------------------------------
  43. CREATE UNIQUE INDEX "MIRLE"."CFG_MATERIAL_PK" ON "MIRLE"."CFG_MATERIAL" ("MATERIAL_ID")
  44. PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  45. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  46. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  47. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  48. TABLESPACE "SYSTEM" ;
  49. --------------------------------------------------------
  50. -- Constraints for Table CFG_MATERIAL
  51. --------------------------------------------------------
  52. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("MATERIAL_NAME" NOT NULL ENABLE);
  53. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("MATERIAL_UNIT" NOT NULL ENABLE);
  54. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("MATERIAL_TYPE" NOT NULL ENABLE);
  55. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("PRODUCT_TYPE" NOT NULL ENABLE);
  56. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("CREATE_USER" NOT NULL ENABLE);
  57. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("CREATE_TIME" NOT NULL ENABLE);
  58. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("UPDATE_USER" NOT NULL ENABLE);
  59. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("UPDATE_TIME" NOT NULL ENABLE);
  60. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("STATUS" NOT NULL ENABLE);
  61. ALTER TABLE "MIRLE"."CFG_MATERIAL" MODIFY ("MATERIAL_ID" NOT NULL ENABLE);
  62. ALTER TABLE "MIRLE"."CFG_MATERIAL" ADD CONSTRAINT "CFG_MATERIAL_PK" PRIMARY KEY ("MATERIAL_ID")
  63. USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  64. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  65. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  66. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  67. TABLESPACE "SYSTEM" ENABLE;