写了个存储过程,怎么有时能insert(插入)10条值,有时只能插入5条值呢?SQL codecreate or replace procedure
写了个存储过程,怎么有时能insert(插入)10条值,有时只能插入5条值呢?
- SQL code
create or replace procedure P_Task_orderISBegin insert into REPORT(a,b,c,d,e,f,g,h,i,j,k, l,m,n,o,p,q,r,s) select * from t1, t2, t3 where t1.a =1 and t1.b = t2.b(+) and t2.c = t3.c; commit; exception when others then rollback;End;
sql如上
[解决办法]
是不是表里数据的问题,检查一下?
[解决办法]
1、查看select * from t1, t2, t3 where t1.a =1 and t1.b = t2.b(+)
and t2.c = t3.c 出来的结果集数量
2、exception
when others then
rollback;
给返回个错误,看看是啥内容
[解决办法]
中间遇到null值了?
[解决办法]
检查selec中的结果集,是多少就是多少。
[解决办法]
- SQL code
select * from t1, t2, t3 where t1.a =1 and t1.b = t2.b(+) and t2.c = t3.c;--这段SELECT结果集,是不是有问题?
