oracle事务的入门级问题。。谢谢大家

来源:百度知道 编辑:UC知道 时间:2024/06/17 10:16:32
create table mytestproc
(
i int
)
insert into mytestproc values(1)
insert into mytestproc values(2)

然后建立了一个事务
create or replace procedure mypro(m int,n out int)
is
j int;
begin
select i into j from mytestproc where i = m;
n:=j;
exception
when no_data_found then
dbms_output.put_line('werew');
end;
为什么我不管传入什么值都异常呢?
嘿嘿,说错了噻。。口误。

俺自己搞明白了 。。谢谢了

这哪是事务,就是过程

create or replace procedure mypro(m int,n out int)
is
j int;
begin
into j select i from mytestproc where i = m; ------------
n:=j;
exception
when no_data_found then
dbms_output.put_line('werew');
end;

再看看吧