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.

69 lines
3.5 KiB

8 months ago
  1. --------------------------------------------------------
  2. -- DDL for Table CFG_STATION
  3. --------------------------------------------------------
  4. CREATE TABLE "MIRLE"."CFG_STATION"
  5. (
  6. "STORAGE_ID" VARCHAR2(7 CHAR),
  7. "STATION_ID" VARCHAR2(9 CHAR),
  8. "STATION_NAME" VARCHAR2(30 CHAR),
  9. "STATION_DESC" VARCHAR2(50 CHAR),
  10. "LEVEL_Z" VARCHAR2(1 BYTE) DEFAULT 1
  11. "AXIS_X" NUMBER(6,2) DEFAULT 0.0,
  12. "AXIS_Y" NUMBER(6,2) DEFAULT 0.0,
  13. "CREATE_USER" VARCHAR2(30 CHAR),
  14. "CREATE_TIME" TIMESTAMP (6) DEFAULT systimestamp,
  15. "UPDATE_USER" VARCHAR2(30 CHAR),
  16. "UPDATE_TIME" TIMESTAMP (6) DEFAULT systimestamp,
  17. "STATUS" NUMBER(1,0) DEFAULT 0
  18. )
  19. SEGMENT CREATION IMMEDIATE
  20. PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  21. NOCOMPRESS LOGGING
  22. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  23. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  24. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  25. TABLESPACE "SYSTEM" ;
  26. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."STORAGE_ID" IS '儲存區編號';
  27. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."STATION_ID" IS '站點編號';
  28. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."STATION_NAME" IS '站點名稱';
  29. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."STATION_DESC" IS '站點敘述';
  30. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."LEVEL_Z" IS '';
  31. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."AXIS_X" IS '圖座標 X';
  32. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."AXIS_Y" IS '圖座標 Y';
  33. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."CREATE_USER" IS '建立人員';
  34. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."CREATE_TIME" IS '建立時間';
  35. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."UPDATE_USER" IS '更新人員';
  36. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."UPDATE_TIME" IS '更新時間';
  37. COMMENT ON COLUMN "MIRLE"."CFG_STATION"."STATUS" IS '資料狀態';
  38. --------------------------------------------------------
  39. -- DDL for Index CFG_STATION_PK
  40. --------------------------------------------------------
  41. CREATE UNIQUE INDEX "MIRLE"."CFG_STATION_PK" ON "MIRLE"."CFG_STATION" ("STORAGE_ID", "STATION_ID")
  42. PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  43. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  44. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  45. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  46. TABLESPACE "SYSTEM" ;
  47. --------------------------------------------------------
  48. -- Constraints for Table CFG_STATION
  49. --------------------------------------------------------
  50. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("STORAGE_ID" NOT NULL ENABLE);
  51. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("STATION_ID" NOT NULL ENABLE);
  52. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("STATION_NAME" NOT NULL ENABLE);
  53. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("LEVEL_Z" NOT NULL ENABLE);
  54. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("CREATE_USER" NOT NULL ENABLE);
  55. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("CREATE_TIME" NOT NULL ENABLE);
  56. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("UPDATE_USER" NOT NULL ENABLE);
  57. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("UPDATE_TIME" NOT NULL ENABLE);
  58. ALTER TABLE "MIRLE"."CFG_STATION" MODIFY ("STATUS" NOT NULL ENABLE);
  59. ALTER TABLE "MIRLE"."CFG_STATION" ADD CONSTRAINT "CFG_STATION_PK" PRIMARY KEY ("STORAGE_ID", "STATION_ID")
  60. USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  61. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  62. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  63. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  64. TABLESPACE "SYSTEM" ENABLE;