Quote:
Originally posted by clark_x
create procedure test ( col_t1 varchar(30), col_t2 char(1) )
returning varchar(30);
define errno int;
define str char(30);
on exception set errno
return errno;
end exception;
set debug file to '/tmp/t_trc';
trace on;
update oper_table
set oper_id='001'
where oper_id='001';
--trace 'errno ' || errno;
return 10000;
end procedure;
when update statement execute sucess£¬ i cannot get the errno£¬
so HOW TO GET SQLCODE AFTER A STATEMENT SUCCESS EXECUTED£¡
|
Hi there,
you can give the below statement after update clause
select dbinfo('sqlca.sqlerrd2') from systables where tabid=1;
This sql statement will return you a count, that is number of rows that have got affected in the immediate previous insert or update statement.
Regards,
lloyd