Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle stored procedures and functions

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Create a stored procedure:

CREATE OR REPLACE procedure proc_trade (v_tradeid in tt_b.number%TYPE,-- transaction id v_third_ip in tt_b.varchar2%TYPE,-- third-party ip v_third_time in tt_b.date%TYPE,-- third-party completion time v_thire_state in tt_b.number%TYPE -- third party status o_result out tt_b.number%TYPE,-- return value o_detail out tt_b.varchar2%TYPE-- detailed description) as-- variable assignment o_result:=0 Business logic processing if v_tradeid > 100 then insert into table_name (...) Values (...); commit; elsif v_tradeid

< 100 and v_tradeid>

50 then insert into table_name (...) Values (...); commit; else goto log; end if;-- jump marker, with the name specified by itself-- exception exception when no_data_found then result:= 2; when dup_val_on_index then result:= 3; when others then result:=-1; end proc_trade

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report