DB_SQL.sql 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. CREATE TABLE SGC.TCS_SITE_TRADE (
  2. CMPN_CD VARCHAR(10) NOT NULL,
  3. SITE_CD VARCHAR(20) NOT NULL,
  4. COVEND_ID NUMBER NOT NULL,
  5. CONT_SEQ NUMBER DEFAULT 1 NOT NULL,
  6. JOB_GB_CD VARCHAR(20),
  7. CONT_ID VARCHAR(100),
  8. CONT_MOD_ID VARCHAR(100),
  9. MOD_NO VARCHAR(100),
  10. PO_DOC_NO VARCHAR(100),
  11. CONT_NM VARCHAR(1000),
  12. CONT_DT VARCHAR(8),
  13. COVEND_NM VARCHAR(100),
  14. COVEND_CORP_REG_NO VARCHAR(20),
  15. CONT_AMT NUMBER,
  16. CONT_SUPPLY_AMT NUMBER,
  17. CONT_TERM VARCHAR(100),
  18. CONT_START_DT DATE,
  19. CONT_END_DT DATE,
  20. CONT_GB VARCHAR(20),
  21. STATUS_CD VARCHAR(20),
  22. TEMPLATE_CD VARCHAR(20),
  23. TEMPLATE_NM VARCHAR(100),
  24. CHG_CONT_YN VARCHAR(20),
  25. CUR_GB VARCHAR(20),
  26. ADJ_GB VARCHAR(20),
  27. RMK_CN VARCHAR(4000),
  28. CRT_SYS_CD VARCHAR(20),
  29. WRTE_DT DATE DEFAULT sysdate,
  30. WRTE_PR VARCHAR(20),
  31. MDFT_DT DATE,
  32. MDFT_PR VARCHAR(20)
  33. )
  34. TABLESPACE TS_SGCDATA
  35. PCTFREE 10
  36. INITRANS 2
  37. STORAGE (
  38. MAXEXTENTS UNLIMITED
  39. )
  40. LOGGING
  41. NOPARALLEL;
  42. COMMENT ON TABLE SGC.TCS_SITE_TRADE IS '하자)현장업체계약';
  43. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.ADJ_GB IS '정산 구분';
  44. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CHG_CONT_YN IS '변경 계약 여부';
  45. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CMPN_CD IS '회사 코드';
  46. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_AMT IS '계약 금액';
  47. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_DT IS '계약 일자';
  48. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_END_DT IS '계약 만료일';
  49. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_GB IS '계약 구분';
  50. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_ID IS '계약 번호';
  51. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_MOD_ID IS '변경 계약번호';
  52. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_NM IS '계약 명';
  53. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_SEQ IS '계약순번';
  54. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_START_DT IS '계약 시작일';
  55. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_SUPPLY_AMT IS '공급 금액';
  56. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CONT_TERM IS '계약 기간';
  57. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.COVEND_CORP_REG_NO IS '업체 사업자번호';
  58. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.COVEND_ID IS '협력업체 ID';
  59. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.COVEND_NM IS '업체 명';
  60. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CRT_SYS_CD IS '생성시스템코드';
  61. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.CUR_GB IS '통화 단위';
  62. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.JOB_GB_CD IS '협력업체유형코드[CS004]';
  63. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.MDFT_DT IS '수정 일자';
  64. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.MDFT_PR IS '수정 자';
  65. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.MOD_NO IS '변경 계약차수';
  66. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.PO_DOC_NO IS '발주 번호';
  67. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.RMK_CN IS '비고_내용';
  68. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.SITE_CD IS '현장코드';
  69. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.STATUS_CD IS '계약 상태';
  70. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.TEMPLATE_CD IS '계약서 코드';
  71. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.TEMPLATE_NM IS '계약서 코드명';
  72. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.WRTE_DT IS '작성 일자';
  73. COMMENT ON COLUMN SGC.TCS_SITE_TRADE.WRTE_PR IS '작성 자';
  74. CREATE UNIQUE INDEX SGC.PK_TCS_SITE_TRADE ON SGC.TCS_SITE_TRADE (
  75. CMPN_CD ASC,
  76. SITE_CD ASC,
  77. COVEND_ID ASC,
  78. CONT_SEQ ASC
  79. )
  80. LOGGING
  81. TABLESPACE TS_SGCIDX
  82. PCTFREE 10
  83. INITRANS 2;
  84. ALTER TABLE SGC.TCS_SITE_TRADE ADD CONSTRAINT PK_TCS_SITE_TRADE
  85. PRIMARY KEY (
  86. CMPN_CD,
  87. SITE_CD,
  88. COVEND_ID,
  89. CONT_SEQ
  90. );