2019-06-25.sql 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. -- Add/modify columns
  2. alter table KJ_UNIFIED_SCORE_DETAIL add cert_no VARCHAR2(18);
  3. -- Add comments to the columns
  4. comment on column KJ_UNIFIED_SCORE_DETAIL.cert_no
  5. is '准考证';
  6. -- Add/modify columns
  7. alter table KJ_COURSE_RATIO rename column apply_form to SCORE_TYPE;
  8. -- Add comments to the columns
  9. comment on column KJ_COURSE_RATIO.score_type
  10. is '成绩类型(1-网络助学、2-专本衔接)';
  11. -- Create table
  12. create table kj_college_score_school
  13. (
  14. id number(10) not null,
  15. batch_id number(10),
  16. year_code number(6),
  17. join_school_id number(10),
  18. school_id number(10),
  19. status number(1)
  20. )
  21. ;
  22. -- Add comments to the table
  23. comment on table kj_college_score_school
  24. is '衔接学校和主考学校上报情况表';
  25. -- Add comments to the columns
  26. comment on column kj_college_score_school.batch_id
  27. is '批次ID,和kj_college_batch_info表关联';
  28. comment on column kj_college_score_school.year_code
  29. is '批次码';
  30. comment on column kj_college_score_school.join_school_id
  31. is '衔接学校ID';
  32. comment on column kj_college_score_school.school_id
  33. is '主考学校ID';
  34. comment on column kj_college_score_school.status
  35. is '0:未上报,1:已上报';
  36. -- Create/Recreate primary, unique and foreign key constraints
  37. alter table kj_college_score_school
  38. add constraint PK_KJ_COLLEGE_SCORE_SCHOOL_ID primary key (ID);
  39. -- Create sequence
  40. create sequence SEQ_KJ_COLLEGE_SCORE_SCHOOL
  41. minvalue 1
  42. start with 1
  43. increment by 1;