oracle表结构
-- Create table
create table COMM.STAFF_DICT
(
emp_no VARCHAR2(10),
dept_code VARCHAR2(8),
name VARCHAR2(200),
input_code VARCHAR2(20),
job VARCHAR2(8),
title VARCHAR2(26),
user_name VARCHAR2(16),
input_code_wb VARCHAR2(20),
id VARCHAR2(4) not null,
create_date DATE,
password VARCHAR2(255),
sys_flag NUMBER(5),
status NUMBER(1) default 1,
id_old VARCHAR2(10),
autograph BLOB,
autograph_type VARCHAR2(10),
zonecode VARCHAR2(6) default '000000',
code_sign VARCHAR2(4),
cardrandom VARCHAR2(20),
user_type VARCHAR2(4),
window_sign VARCHAR2(4),
community_code VARCHAR2(8),
head NUMBER,
doctorskill VARCHAR2(500),
doctorintroduction VARCHAR2(1000),
occupationalphysiciannumber VARCHAR2(100),
sex VARCHAR2(3),
telephone VARCHAR2(11),
birthday DATE,
education VARCHAR2(30),
practicecode VARCHAR2(20),
id_no VARCHAR2(30),
birth_place VARCHAR2(30),
headphoto BLOB,
visibled NUMBER(1) default 0,
ydyb_account_no VARCHAR2(100),
ydyb_regr_date DATE,
serial_no VARCHAR2(100),
isaudit VARCHAR2(10) default '0',
audit_opinion VARCHAR2(4000),
audit_oper VARCHAR2(50),
audit_date VARCHAR2(20),
morepre_flag VARCHAR2(10),
insur_flag VARCHAR2(10),
presc_flag VARCHAR2(10),
uploadpb VARCHAR2(1) default '0',
prescribe_type VARCHAR2(60),
certificate_type CHAR(2),
practice_area VARCHAR2(4),
prescribe_right CHAR(1),
practice_startdate DATE,
practice_enddate DATE,
oper_winno VARCHAR2(10)
)
tablespace TSP_COMM
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 8K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table COMM.STAFF_DICT
is '职工字典';
-- Add comments to the columns
comment on column COMM.STAFF_DICT.emp_no
is '人员编号';
comment on column COMM.STAFF_DICT.dept_code
is '科室';
comment on column COMM.STAFF_DICT.name
is '姓名';
comment on column COMM.STAFF_DICT.input_code
is '拼音码';
comment on column COMM.STAFF_DICT.job
is '职业';
comment on column COMM.STAFF_DICT.title
is '职称';
comment on column COMM.STAFF_DICT.user_name
is '填写人姓名';
comment on column COMM.STAFF_DICT.input_code_wb
is '五笔码';
comment on column COMM.STAFF_DICT.id
is '主键ID';
comment on column COMM.STAFF_DICT.create_date
is '创建日期';
comment on column COMM.STAFF_DICT.password
is '加密后口令';
comment on column COMM.STAFF_DICT.sys_flag
is '是否oracle用户';
comment on column COMM.STAFF_DICT.status
is '状态';
comment on column COMM.STAFF_DICT.autograph
is '医生签名图片';
comment on column COMM.STAFF_DICT.autograph_type
is '医生签名图片拓展名';
comment on column COMM.STAFF_DICT.zonecode
is '所在医院分区代码';
comment on column COMM.STAFF_DICT.code_sign
is '默认输入法';
comment on column COMM.STAFF_DICT.window_sign
is '医生站默认登录打开窗口';
comment on column COMM.STAFF_DICT.head
is '用户登录图像';
comment on column COMM.STAFF_DICT.doctorskill
is '医生擅长';
comment on column COMM.STAFF_DICT.doctorintroduction
is '医生简介';
comment on column COMM.STAFF_DICT.occupationalphysiciannumber
is '医师执业资格证号';
comment on column COMM.STAFF_DICT.sex
is '性别';
comment on column COMM.STAFF_DICT.telephone
is '电话号码';
comment on column COMM.STAFF_DICT.birthday
is '医生出生日期';
comment on column COMM.STAFF_DICT.education
is '医生学历';
comment on column COMM.STAFF_DICT.practicecode
is '医生执业编码';
comment on column COMM.STAFF_DICT.id_no
is '身份证号';
comment on column COMM.STAFF_DICT.birth_place
is '出生地';
comment on column COMM.STAFF_DICT.headphoto
is '头像';
comment on column COMM.STAFF_DICT.visibled
is '是否显示:0-不显示1-显示';
comment on column COMM.STAFF_DICT.ydyb_account_no
is '注册账号';
comment on column COMM.STAFF_DICT.ydyb_regr_date
is '注册日期';
comment on column COMM.STAFF_DICT.serial_no
is '登记流水号';
comment on column COMM.STAFF_DICT.isaudit
is '审批结果空:未审核;1:审核通过;0:审核不通过';
comment on column COMM.STAFF_DICT.audit_opinion
is '审批意见';
comment on column COMM.STAFF_DICT.audit_oper
is '审批人';
comment on column COMM.STAFF_DICT.audit_date
is '审批日期';
comment on column COMM.STAFF_DICT.morepre_flag
is '多点执业标志';
comment on column COMM.STAFF_DICT.insur_flag
is '医保医师标志';
comment on column COMM.STAFF_DICT.presc_flag
is '处方权标志';
comment on column COMM.STAFF_DICT.uploadpb
is '上传判别';
comment on column COMM.STAFF_DICT.oper_winno
is '操作员窗口号';
-- Create/Recreate primary, unique and foreign key constraints
alter table COMM.STAFF_DICT
add constraint PK_STAFF_DICT_NEW primary key (ID)
using index
tablespace TSP_COMM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 128K
next 1M
minextents 1
maxextents unlimited
);
alter table COMM.STAFF_DICT
add unique (EMP_NO)
using index
tablespace TSP_COMM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table COMM.STAFF_DICT
add unique (USER_NAME)
using index
tablespace TSP_COMM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table COMM.STAFF_DICT
add constraint FK_STAFF_DICT1 foreign key (DEPT_CODE)
references COMM.DEPT_DICT (DEPT_CODE);
-- Grant/Revoke object privileges
grant select, insert, update, delete on COMM.STAFF_DICT to DBA;
grant select, insert, update, delete, references, alter, index on COMM.STAFF_DICT to PUBLIC;