--创建序列    

create sequence zonecode_seq start with 1 increment by 1;  

 

--创建触发器    

create or replace trigger zonecode_trigger      

before insert on org_HospitalZone_dict      

for each row      

begin      

select zonecode_seq.nextval into :new.HOSP_ZONECODE from dual;    

end ; 


insert into org_HospitalZone_dict(Hosp_Zonename) values('1医院')

insert into org_HospitalZone_dict(Hosp_Zonename) values('2医院')

insert into org_HospitalZone_dict(Hosp_Zonename) values('3院')

insert into org_HospitalZone_dict(Hosp_Zonename) values('4院区')


select * from org_HospitalZone_dict
delete  from org_HospitalZone_dict t where t.hosp_zonecode<5 

 

相关文章:

  • 2022-12-23
  • 2022-02-12
  • 2021-12-04
  • 2022-01-29
  • 2021-05-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-02-22
  • 2022-01-23
  • 2022-12-23
相关资源
相似解决方案