1. -- Create table
    2. create table AMLDATA.T_RSK_CLIENT_GRADE
    3. (
    4. busi_date CHAR(8) not null,
    5. branch_no VARCHAR2(6) not null,
    6. client_id VARCHAR2(20) not null,
    7. client_name VARCHAR2(100),
    8. total_mark NUMBER,
    9. grade_value CHAR(1) not null,
    10. grade_name VARCHAR2(30),
    11. pk_id VARCHAR2(32) not null,
    12. rule_cnt NUMBER,
    13. flag CHAR(1),
    14. client_status CHAR(1),
    15. unique_id VARCHAR2(64),
    16. run_time CHAR(14)
    17. )
    18. tablespace TS_AMLDATA
    19. pctfree 10
    20. initrans 1
    21. maxtrans 255
    22. storage
    23. (
    24. initial 4M
    25. next 1M
    26. minextents 1
    27. maxextents unlimited
    28. )
    29. nologging;
    30. -- Add comments to the table
    31. comment on table AMLDATA.T_RSK_CLIENT_GRADE
    32. is '客户风险等级表(动态)-V9.0.1.0';
    33. -- Add comments to the columns
    34. comment on column AMLDATA.T_RSK_CLIENT_GRADE.busi_date
    35. is '业务日期';
    36. comment on column AMLDATA.T_RSK_CLIENT_GRADE.branch_no
    37. is '营业部代码';
    38. comment on column AMLDATA.T_RSK_CLIENT_GRADE.client_id
    39. is '客户号';
    40. comment on column AMLDATA.T_RSK_CLIENT_GRADE.client_name
    41. is '客户名称';
    42. comment on column AMLDATA.T_RSK_CLIENT_GRADE.total_mark
    43. is '总分';
    44. comment on column AMLDATA.T_RSK_CLIENT_GRADE.grade_value
    45. is '等级代码';
    46. comment on column AMLDATA.T_RSK_CLIENT_GRADE.grade_name
    47. is '等级名称';
    48. comment on column AMLDATA.T_RSK_CLIENT_GRADE.pk_id
    49. is '主键';
    50. comment on column AMLDATA.T_RSK_CLIENT_GRADE.rule_cnt
    51. is '风险指标数量';
    52. comment on column AMLDATA.T_RSK_CLIENT_GRADE.flag
    53. is '0 直接定级 1 系统计算 a老系统销户客户人工落地低风险所有客户均已销户 2 人工调整';
    54. comment on column AMLDATA.T_RSK_CLIENT_GRADE.client_status
    55. is '客户状态';
    56. comment on column AMLDATA.T_RSK_CLIENT_GRADE.unique_id
    57. is '唯一客户编号';
    58. comment on column AMLDATA.T_RSK_CLIENT_GRADE.run_time
    59. is '运行时间';
    60. -- Create/Recreate indexes
    61. create unique index AMLDATA.IDX_RSK_CLIENT_GRADE on AMLDATA.T_RSK_CLIENT_GRADE (UNIQUE_ID, CLIENT_ID)
    62. tablespace TS_AMLDATA
    63. pctfree 10
    64. initrans 2
    65. maxtrans 255
    66. storage
    67. (
    68. initial 2M
    69. next 1M
    70. minextents 1
    71. maxextents unlimited
    72. )
    73. nologging reverse;
    74. create index AMLDATA.IDX_RSK_CLIENT_GRADE_01 on AMLDATA.T_RSK_CLIENT_GRADE (BUSI_DATE, CLIENT_ID)
    75. tablespace TS_AMLDATA
    76. pctfree 10
    77. initrans 2
    78. maxtrans 255
    79. storage
    80. (
    81. initial 128K
    82. next 1M
    83. minextents 1
    84. maxextents unlimited
    85. );
    86. create unique index AMLDATA.PK_RSK_CLIENT_GRADE on AMLDATA.T_RSK_CLIENT_GRADE (PK_ID)
    87. tablespace TS_AMLDATA
    88. pctfree 10
    89. initrans 2
    90. maxtrans 255
    91. storage
    92. (
    93. initial 3M
    94. next 1M
    95. minextents 1
    96. maxextents unlimited
    97. )
    98. nologging;