ORACLE之删除行,提交命令,回滚命令

twn_ryjffa 表名

 

delete from twn_ryjffa

   where getsure_unit_no = sgetsure_unit_no

     and insure_vol = sinsure_vol

     and insure_level = sinsure_level

     and insure_itype = sinsure_itype

     and wk_year = swk_year;

 

 commit;

 

commit :在手动写命令或过程中最后记得写commit否则结果不会永久生效

 

rollback:当出现异常时,完全取消事务的结果

 

例:

exception

 when others then

    sresult := 'select ''-1'' msgno,''由于其他原因删除经费方案失败' || sqlcode || ' ' ||

               sqlerrm || '!'' msg from dual';

    rollback;

相关文章:

  • 2021-08-18
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2021-09-07
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2022-01-05
  • 2021-06-14
  • 2022-12-23
  • 2021-12-10
  • 2021-08-27
相关资源
相似解决方案