01T_MST_DR_REPORT.sql 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. -- Create table
  2. create table T_MST_DR_REPORT
  3. (
  4. reportid NUMBER not null,
  5. reportcode NVARCHAR2(32) not null,
  6. reportname NVARCHAR2(64) not null,
  7. commandtype NVARCHAR2(32),
  8. sqlscript NVARCHAR2(2000),
  9. reportname2 NVARCHAR2(64),
  10. commandtype2 NVARCHAR2(32),
  11. sqlscript2 NVARCHAR2(2000),
  12. remarks NVARCHAR2(64),
  13. accountid NUMBER not null,
  14. valueflag CHAR(1) default 1 not null,
  15. createtime DATE default sysdate not null,
  16. createuserid NUMBER not null,
  17. updatetime DATE default sysdate not null,
  18. updateuserid NUMBER not null
  19. )
  20. tablespace USERS
  21. pctfree 10
  22. initrans 1
  23. maxtrans 255
  24. storage
  25. (
  26. initial 64K
  27. next 1M
  28. minextents 1
  29. maxextents unlimited
  30. );
  31. -- Add comments to the columns
  32. comment on column T_MST_DR_REPORT.reportid
  33. is '报表ID';
  34. comment on column T_MST_DR_REPORT.reportcode
  35. is '报表编码';
  36. comment on column T_MST_DR_REPORT.reportname
  37. is '报表名称';
  38. comment on column T_MST_DR_REPORT.commandtype
  39. is '命令类型';
  40. comment on column T_MST_DR_REPORT.sqlscript
  41. is 'SQL文本';
  42. comment on column T_MST_DR_REPORT.reportname2
  43. is '报表名称2';
  44. comment on column T_MST_DR_REPORT.commandtype2
  45. is '命令类型2';
  46. comment on column T_MST_DR_REPORT.sqlscript2
  47. is 'SQL文本2';
  48. comment on column T_MST_DR_REPORT.remarks
  49. is '备注';
  50. comment on column T_MST_DR_REPORT.accountid
  51. is '帐套ID (所属帐套ID)';
  52. comment on column T_MST_DR_REPORT.valueflag
  53. is '有效标识 (1:正常 0:停用)';
  54. comment on column T_MST_DR_REPORT.createtime
  55. is '创建时间 (更新时,不更新该数据)';
  56. comment on column T_MST_DR_REPORT.createuserid
  57. is '创建数据操作员ID (更新时,不更新该数据)';
  58. comment on column T_MST_DR_REPORT.updatetime
  59. is '更新时间 (新建时,取新建时间;更新时,取最新时间更新)';
  60. comment on column T_MST_DR_REPORT.updateuserid
  61. is '更新数据操作员ID (新建时,取创建者ID;更新时,取更新者ID)';
  62. -- Create/Recreate primary, unique and foreign key constraints
  63. alter table T_MST_DR_REPORT
  64. add primary key (REPORTID)
  65. using index
  66. tablespace USERS
  67. pctfree 10
  68. initrans 2
  69. maxtrans 255
  70. storage
  71. (
  72. initial 64K
  73. next 1M
  74. minextents 1
  75. maxextents unlimited
  76. );