DB_SQL.sql 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. CREATE TABLE SGC.TCS_SITE_DHS (
  2. CMPN_CD VARCHAR(10) NOT NULL,
  3. SITE_CD VARCHAR(20) NOT NULL,
  4. DONG VARCHAR(100) NOT NULL,
  5. HSNO VARCHAR(100) NOT NULL,
  6. CNTPR_OCPH_NM VARCHAR(100),
  7. CP_NO VARCHAR(100),
  8. WRTE_DT DATE DEFAULT sysdate,
  9. WRTE_PR VARCHAR(20),
  10. MDFT_DT DATE,
  11. MDFT_PR VARCHAR(20)
  12. )
  13. TABLESPACE TS_SGCDATA
  14. PCTFREE 10
  15. INITRANS 2
  16. STORAGE (
  17. MAXEXTENTS UNLIMITED
  18. )
  19. LOGGING
  20. NOPARALLEL;
  21. COMMENT ON TABLE SGC.TCS_SITE_DHS IS '하자) 현장 동호수';
  22. COMMENT ON COLUMN SGC.TCS_SITE_DHS.CMPN_CD IS '회사 코드';
  23. COMMENT ON COLUMN SGC.TCS_SITE_DHS.CNTPR_OCPH_NM IS '계약 입주 자';
  24. COMMENT ON COLUMN SGC.TCS_SITE_DHS.CP_NO IS '핸드폰 번호';
  25. COMMENT ON COLUMN SGC.TCS_SITE_DHS.DONG IS '동';
  26. COMMENT ON COLUMN SGC.TCS_SITE_DHS.HSNO IS '호수';
  27. COMMENT ON COLUMN SGC.TCS_SITE_DHS.MDFT_DT IS '수정 일자';
  28. COMMENT ON COLUMN SGC.TCS_SITE_DHS.MDFT_PR IS '수정 자';
  29. COMMENT ON COLUMN SGC.TCS_SITE_DHS.SITE_CD IS '현장코드';
  30. COMMENT ON COLUMN SGC.TCS_SITE_DHS.WRTE_DT IS '작성 일자';
  31. COMMENT ON COLUMN SGC.TCS_SITE_DHS.WRTE_PR IS '작성 자';
  32. CREATE UNIQUE INDEX SGC.PK_TCS_SITE_DHS ON SGC.TCS_SITE_DHS (
  33. CMPN_CD ASC,
  34. SITE_CD ASC,
  35. DONG ASC,
  36. HSNO ASC
  37. )
  38. LOGGING
  39. TABLESPACE TS_SGCIDX
  40. PCTFREE 10
  41. INITRANS 2;
  42. ALTER TABLE SGC.TCS_SITE_DHS ADD CONSTRAINT PK_TCS_SITE_DHS
  43. PRIMARY KEY (
  44. CMPN_CD,
  45. SITE_CD,
  46. DONG,
  47. HSNO
  48. );