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.

60 lines
3.0 KiB

8 months ago
  1. --------------------------------------------------------
  2. -- DDL for Table CUR_ALARM_DATA
  3. --------------------------------------------------------
  4. CREATE TABLE "MIRLE"."CUR_ALARM_DATA"
  5. (
  6. "ALARM_CODE" VARCHAR2(10 CHAR),
  7. "ALARM_TYPE" VARCHAR2(3 CHAR),
  8. "START_TIME" TIMESTAMP (6),
  9. "ALARM_DESC" VARCHAR2(50 CHAR),
  10. "SOFTWARE_ID" VARCHAR2(7 CHAR),
  11. "TASK_ID" VARCHAR2(16 CHAR),
  12. "VEHICLE_ID" VARCHAR2(16 CHAR),
  13. "END_TIME" TIMESTAMP (6),
  14. "PROGRAM_NAME" VARCHAR2(30 CHAR)
  15. )
  16. SEGMENT CREATION IMMEDIATE
  17. PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  18. NOCOMPRESS LOGGING
  19. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  20. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  21. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  22. TABLESPACE "SYSTEM" ;
  23. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."ALARM_CODE" IS '異常代碼';
  24. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."ALARM_TYPE" IS '異常類別';
  25. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."START_TIME" IS '起始時間';
  26. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."ALARM_DESC" IS '異常敘述';
  27. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."SOFTWARE_ID" IS '軟體編號';
  28. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."SOFTWARE_ID" IS '軟體編號';
  29. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."VEHICLE_ID" IS '設備編號';
  30. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."END_TIME" IS '結束時間';
  31. COMMENT ON COLUMN "MIRLE"."CUR_ALARM_DATA"."PROGRAM_NAME" IS '程式名稱';
  32. --------------------------------------------------------
  33. -- DDL for Index CUR_ALARM_DATA_PK
  34. --------------------------------------------------------
  35. CREATE UNIQUE INDEX "MIRLE"."CUR_ALARM_DATA_PK" ON "MIRLE"."CUR_ALARM_DATA" ("ALARM_CODE", "ALARM_TYPE", "START_TIME")
  36. PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  37. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  38. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  39. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  40. TABLESPACE "SYSTEM" ;
  41. --------------------------------------------------------
  42. -- Constraints for Table CUR_ALARM_DATA
  43. --------------------------------------------------------
  44. ALTER TABLE "MIRLE"."CUR_ALARM_DATA" MODIFY ("ALARM_CODE" NOT NULL ENABLE);
  45. ALTER TABLE "MIRLE"."CUR_ALARM_DATA" MODIFY ("ALARM_TYPE" NOT NULL ENABLE);
  46. ALTER TABLE "MIRLE"."CUR_ALARM_DATA" MODIFY ("START_TIME" NOT NULL ENABLE);
  47. ALTER TABLE "MIRLE"."CUR_ALARM_DATA" MODIFY ("SOFTWARE_ID" NOT NULL ENABLE);
  48. ALTER TABLE "MIRLE"."CUR_ALARM_DATA" MODIFY ("TASK_ID" NOT NULL ENABLE);
  49. ALTER TABLE "MIRLE"."CUR_ALARM_DATA" MODIFY ("PROGRAM_NAME" NOT NULL ENABLE);
  50. ALTER TABLE "MIRLE"."CUR_ALARM_DATA" ADD CONSTRAINT "CUR_ALARM_DATA_PK" PRIMARY KEY ("ALARM_CODE", "ALARM_TYPE", "START_TIME")
  51. USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  52. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  53. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  54. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  55. TABLESPACE "SYSTEM" ENABLE;